mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
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:
parent
f3ca4646fc
commit
8f4cab6a1a
3 changed files with 3 additions and 1 deletions
|
@ -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>
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue