Sfoglia il codice sorgente

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

Sosuke Suzuki 5 anni fa
parent
commit
5563dd30d7
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  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();
     }
   };