mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Do not remove node on ESC
This commit is contained in:
parent
9b2afbd18d
commit
bcbed7dbc4
1 changed files with 5 additions and 0 deletions
|
@ -36,6 +36,11 @@ export function textWysiwyg({
|
||||||
input.onkeydown = ev => {
|
input.onkeydown = ev => {
|
||||||
if (ev.key === KEYS.ESCAPE) {
|
if (ev.key === KEYS.ESCAPE) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
|
if (initText) {
|
||||||
|
input.value = initText;
|
||||||
|
handleSubmit();
|
||||||
|
return;
|
||||||
|
}
|
||||||
cleanup();
|
cleanup();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue