Browse Source

Add new line on Enter (#1161)

* Add new line on Enter

Fixes #1158

* Fix lint
pull/1163/head
Mohit kumar Bajoria 6 years ago committed by GitHub
parent
commit
9b6700755a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/element/textWysiwyg.tsx

6
src/element/textWysiwyg.tsx

@ -97,11 +97,7 @@ export function textWysiwyg({ @@ -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;

Loading…
Cancel
Save