From 71306bc5b46182254a0da4abe412dabb36c97980 Mon Sep 17 00:00:00 2001 From: mosaicer Date: Wed, 4 Jan 2023 22:42:58 +0900 Subject: [PATCH] Ignore pressing a tab key if IME is working --- src/muya/lib/contentState/tabCtrl.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/muya/lib/contentState/tabCtrl.js b/src/muya/lib/contentState/tabCtrl.js index 4a2e6790..c2a14bf3 100644 --- a/src/muya/lib/contentState/tabCtrl.js +++ b/src/muya/lib/contentState/tabCtrl.js @@ -302,6 +302,11 @@ const tabCtrl = ContentState => { // disable tab focus event.preventDefault() + // skip subsequent processing if IME is working + if (event.isComposing) { + return + } + const { start, end } = selection.getCursorRange() if (!start || !end) { return