Skip to content

Commit

Permalink
Fix IME handling
Browse files Browse the repository at this point in the history
Closes #1431 and #1375
  • Loading branch information
glacambre committed Nov 5, 2022
1 parent f057753 commit d7355dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/KeyHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
}
});

Expand Down

0 comments on commit d7355dc

Please sign in to comment.