diff --git a/src/actions/actionFinalize.tsx b/src/actions/actionFinalize.tsx index 503f946c..e82c4c5e 100644 --- a/src/actions/actionFinalize.tsx +++ b/src/actions/actionFinalize.tsx @@ -47,6 +47,7 @@ export const actionFinalize = register({ : "selection", draggingElement: null, multiElement: null, + editingElement: null, selectedElementIds: {}, }, }; diff --git a/src/element/textWysiwyg.tsx b/src/element/textWysiwyg.tsx index 26e6fcf7..fe44a16e 100644 --- a/src/element/textWysiwyg.tsx +++ b/src/element/textWysiwyg.tsx @@ -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; + handleSubmit(); } if (ev.key === KEYS.ENTER && !ev.shiftKey) { ev.preventDefault();