make text committing cross-platform (#1188)

This commit is contained in:
David Luzar 2020-04-03 15:56:23 +02:00 committed by GitHub
parent cd3083e8e6
commit 8030a167c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,7 +109,7 @@ export function textWysiwyg({
ev.preventDefault(); ev.preventDefault();
handleSubmit(); handleSubmit();
} }
if (ev.key === KEYS.ENTER && (ev.shiftKey || ev.metaKey)) { if (ev.key === KEYS.ENTER && (ev.shiftKey || ev[KEYS.CTRL_OR_CMD])) {
ev.preventDefault(); ev.preventDefault();
if (ev.isComposing || ev.keyCode === 229) { if (ev.isComposing || ev.keyCode === 229) {
return; return;