diff --git a/ts/editor/inputHandlers.ts b/ts/editor/inputHandlers.ts index bed09d66c..052575614 100644 --- a/ts/editor/inputHandlers.ts +++ b/ts/editor/inputHandlers.ts @@ -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;