Parcourir la source

Modify to ignore enter-key in IME composing (#446)

Sosuke Suzuki il y a 5 ans
Parent
commit
5563dd30d7
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      src/element/textWysiwyg.tsx

+ 3 - 0
src/element/textWysiwyg.tsx

@@ -55,6 +55,9 @@ export function textWysiwyg({
     }
     if (ev.key === KEYS.ENTER) {
       ev.preventDefault();
+      if (ev.isComposing || ev.keyCode === 229) {
+        return;
+      }
       handleSubmit();
     }
   };