support newline on shift+enter (#1324)
This commit is contained in:
parent
fdebb38bf6
commit
3fd6f3023f
@ -108,18 +108,13 @@ export function textWysiwyg({
|
|||||||
if (event.key === KEYS.ESCAPE) {
|
if (event.key === KEYS.ESCAPE) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
handleSubmit();
|
handleSubmit();
|
||||||
}
|
} else if (event.key === KEYS.ENTER && event[KEYS.CTRL_OR_CMD]) {
|
||||||
if (
|
|
||||||
event.key === KEYS.ENTER &&
|
|
||||||
(event.shiftKey || event[KEYS.CTRL_OR_CMD])
|
|
||||||
) {
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (event.isComposing || event.keyCode === 229) {
|
if (event.isComposing || event.keyCode === 229) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handleSubmit();
|
handleSubmit();
|
||||||
}
|
} else if (event.key === KEYS.ENTER && !event.altKey) {
|
||||||
if (event.key === KEYS.ENTER && !event.shiftKey) {
|
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user