From add6d86ae634e917ec5057a57604f6160d9c6d5e Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Thu, 2 Sep 2021 18:32:28 +0200 Subject: [PATCH] Fix Tab not moving caret to end --- ts/editor/focus-handlers.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ts/editor/focus-handlers.ts b/ts/editor/focus-handlers.ts index 714f393bb..11c317ead 100644 --- a/ts/editor/focus-handlers.ts +++ b/ts/editor/focus-handlers.ts @@ -15,11 +15,7 @@ import { getCurrentField } from "./helpers"; export function onFocus(evt: FocusEvent): void { const currentField = evt.currentTarget as EditingArea; currentField.focus(); - - if (currentField.getSelection().anchorNode === null) { - // selection is not inside editable after focusing - currentField.caretToEnd(); - } + currentField.caretToEnd(); bridgeCommand(`focus:${currentField.ord}`); fieldFocused.set(true);