Do not remove node on ESC

This commit is contained in:
hazam 2020-01-09 00:01:55 +05:00
parent 9b2afbd18d
commit bcbed7dbc4

View file

@ -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;
}