Text esc fixes (#925)
* fix incorrectly resetting state on esc * confirm text on esc
This commit is contained in:
parent
3a5ca27600
commit
f0e6f4dbb8
@ -47,6 +47,7 @@ export const actionFinalize = register({
|
||||
: "selection",
|
||||
draggingElement: null,
|
||||
multiElement: null,
|
||||
editingElement: null,
|
||||
selectedElementIds: {},
|
||||
},
|
||||
};
|
||||
|
@ -92,13 +92,7 @@ export function textWysiwyg({
|
||||
editable.onkeydown = ev => {
|
||||
if (ev.key === KEYS.ESCAPE) {
|
||||
ev.preventDefault();
|
||||
if (initText) {
|
||||
editable.innerText = initText;
|
||||
handleSubmit();
|
||||
return;
|
||||
}
|
||||
cleanup();
|
||||
return;
|
||||
}
|
||||
if (ev.key === KEYS.ENTER && !ev.shiftKey) {
|
||||
ev.preventDefault();
|
||||
|
Loading…
x
Reference in New Issue
Block a user