From d7355dc180e8a6556d399938b63db08acd93ce1d Mon Sep 17 00:00:00 2001 From: glacambre Date: Fri, 4 Nov 2022 08:34:28 +0100 Subject: [PATCH] Fix IME handling Closes #1431 and #1375 --- src/KeyHandler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/KeyHandler.ts b/src/KeyHandler.ts index 07bf4e7a..57d47d71 100644 --- a/src/KeyHandler.ts +++ b/src/KeyHandler.ts @@ -58,13 +58,13 @@ export class KeyHandler extends EventEmitter<"input", (s: string) => void> { this.emit("input", evt.target.value); evt.preventDefault(); evt.stopImmediatePropagation(); + evt.target.innerText = ""; + evt.target.value = ""; }).bind(this); this.elem.addEventListener("input", (evt: any) => { if (evt.isTrusted && !evt.isComposing) { acceptInput(evt); - evt.target.innerText = ""; - evt.target.value = ""; } });