Add support for committing a text entry on cmd/shift click (#1185)
This commit is contained in:
parent
b9b58d4464
commit
980d08ce56
@ -109,6 +109,13 @@ export function textWysiwyg({
|
|||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
handleSubmit();
|
handleSubmit();
|
||||||
}
|
}
|
||||||
|
if (ev.key === KEYS.ENTER && (ev.shiftKey || ev.metaKey)) {
|
||||||
|
ev.preventDefault();
|
||||||
|
if (ev.isComposing || ev.keyCode === 229) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
handleSubmit();
|
||||||
|
}
|
||||||
if (ev.key === KEYS.ENTER && !ev.shiftKey) {
|
if (ev.key === KEYS.ENTER && !ev.shiftKey) {
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user