From bcbed7dbc4ce8c23447a01d9bc0a304d9ab7edea Mon Sep 17 00:00:00 2001 From: hazam Date: Thu, 9 Jan 2020 00:01:55 +0500 Subject: [PATCH] Do not remove node on ESC --- src/element/textWysiwyg.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/element/textWysiwyg.tsx b/src/element/textWysiwyg.tsx index fb0223b77..612a26529 100644 --- a/src/element/textWysiwyg.tsx +++ b/src/element/textWysiwyg.tsx @@ -36,6 +36,11 @@ export function textWysiwyg({ input.onkeydown = ev => { if (ev.key === KEYS.ESCAPE) { ev.preventDefault(); + if (initText) { + input.value = initText; + handleSubmit(); + return; + } cleanup(); return; }