Pārlūkot izejas kodu

Add new line on Enter (#1161)

* Add new line on Enter

Fixes #1158

* Fix lint
Mohit kumar Bajoria 5 gadi atpakaļ
vecāks
revīzija
9b6700755a
1 mainītis faili ar 1 papildinājumiem un 5 dzēšanām
  1. 1 5
      src/element/textWysiwyg.tsx

+ 1 - 5
src/element/textWysiwyg.tsx

@@ -97,11 +97,7 @@ export function textWysiwyg({
       handleSubmit();
     }
     if (ev.key === KEYS.ENTER && !ev.shiftKey) {
-      ev.preventDefault();
-      if (ev.isComposing || ev.keyCode === 229) {
-        return;
-      }
-      handleSubmit();
+      ev.stopPropagation();
     }
   };
   editable.onblur = handleSubmit;