From 1e816e87bf6229632d6d90f3468f03e166bb12b2 Mon Sep 17 00:00:00 2001 From: Hikaru Yoshino <57059705+osushicrusher@users.noreply.github.com> Date: Wed, 22 Feb 2023 20:10:29 +0900 Subject: [PATCH] fix: indenting via `tab` clashing with IME compositor (#6258) --- src/element/textWysiwyg.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/element/textWysiwyg.tsx b/src/element/textWysiwyg.tsx index d04dfb8d..1ce43b4d 100644 --- a/src/element/textWysiwyg.tsx +++ b/src/element/textWysiwyg.tsx @@ -463,7 +463,9 @@ export const textWysiwyg = ({ event.code === CODES.BRACKET_RIGHT)) ) { event.preventDefault(); - if (event.shiftKey || event.code === CODES.BRACKET_LEFT) { + if (event.isComposing) { + return; + } else if (event.shiftKey || event.code === CODES.BRACKET_LEFT) { outdent(); } else { indent();