mirror of
https://github.com/ankitects/anki.git
synced 2025-11-12 15:47:12 -05:00
Satisfy formatter
This commit is contained in:
parent
972993b42e
commit
76260c3f8d
1 changed files with 12 additions and 8 deletions
|
|
@ -63,15 +63,19 @@ export function onKey(evt: KeyboardEvent): void {
|
|||
|
||||
globalThis.addEventListener("keydown", (evt: KeyboardEvent) => {
|
||||
if (evt.code === "Tab") {
|
||||
globalThis.addEventListener("focusin", (evt: FocusEvent) => {
|
||||
const newFocusTarget = evt.target;
|
||||
if (newFocusTarget instanceof EditingArea) {
|
||||
caretToEnd(newFocusTarget);
|
||||
updateButtonState();
|
||||
}
|
||||
}, { once: true })
|
||||
globalThis.addEventListener(
|
||||
"focusin",
|
||||
(evt: FocusEvent) => {
|
||||
const newFocusTarget = evt.target;
|
||||
if (newFocusTarget instanceof EditingArea) {
|
||||
caretToEnd(newFocusTarget);
|
||||
updateButtonState();
|
||||
}
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
export function onKeyUp(evt: KeyboardEvent): void {
|
||||
const currentField = evt.currentTarget as EditingArea;
|
||||
|
|
|
|||
Loading…
Reference in a new issue