mirror of
https://github.com/ankitects/anki.git
synced 2025-11-12 23:57:13 -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) => {
|
globalThis.addEventListener("keydown", (evt: KeyboardEvent) => {
|
||||||
if (evt.code === "Tab") {
|
if (evt.code === "Tab") {
|
||||||
globalThis.addEventListener("focusin", (evt: FocusEvent) => {
|
globalThis.addEventListener(
|
||||||
const newFocusTarget = evt.target;
|
"focusin",
|
||||||
if (newFocusTarget instanceof EditingArea) {
|
(evt: FocusEvent) => {
|
||||||
caretToEnd(newFocusTarget);
|
const newFocusTarget = evt.target;
|
||||||
updateButtonState();
|
if (newFocusTarget instanceof EditingArea) {
|
||||||
}
|
caretToEnd(newFocusTarget);
|
||||||
}, { once: true })
|
updateButtonState();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ once: true }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
export function onKeyUp(evt: KeyboardEvent): void {
|
export function onKeyUp(evt: KeyboardEvent): void {
|
||||||
const currentField = evt.currentTarget as EditingArea;
|
const currentField = evt.currentTarget as EditingArea;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue