From 9b6700755a4c53960c9a24d6b45bbf93c957b999 Mon Sep 17 00:00:00 2001 From: Mohit kumar Bajoria Date: Thu, 2 Apr 2020 05:11:42 +0530 Subject: [PATCH] Add new line on Enter (#1161) * Add new line on Enter Fixes #1158 * Fix lint --- src/element/textWysiwyg.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/element/textWysiwyg.tsx b/src/element/textWysiwyg.tsx index a2e43f83..2bc75fc9 100644 --- a/src/element/textWysiwyg.tsx +++ b/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;