Fix editor loses focus when toggling list if list item empty (#3483)

* fix editor loses focus when toggling list if list item empty

* fix CONTRIBUTORS
This commit is contained in:
Cy Pokhrel 2024-10-15 14:38:35 +00:00 committed by GitHub
parent f3ca4646fc
commit 8f4cab6a1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 1 deletions

View file

@ -194,7 +194,7 @@ Gregory Abrasaldo <degeemon@gmail.com>
Taylor Obyen <162023405+taylorobyen@users.noreply.github.com>
Kris Cherven <krischerven@gmail.com>
twwn <github.com/twwn>
Shirish Pokhrel <singurty@gmail.com>
Cy Pokhrel <cy@cy7.sh>
Park Hyunwoo <phu54321@naver.com>
Tomas Fabrizio Orsi <torsi@fi.uba.ar>

View file

@ -27,6 +27,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
function action() {
execCommand(key);
$focusedInput?.focus();
}
$: disabled = !$focusedInput || !editingInputIsRichText($focusedInput);

View file

@ -117,6 +117,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
async function focus(): Promise<void> {
const richText = await richTextPromise;
richText.blur();
richText.focus();
}