Escape at top level cancels highlights

This commit is contained in:
Ian Gulliver
2019-07-11 04:28:55 +00:00
parent 057856a2d2
commit f7822b24b5

View File

@@ -177,6 +177,11 @@ class Editor extends List {
e.stopPropagation();
e.preventDefault();
return;
case 'Escape':
for (let entry of this.queryEntries('.highlight')) {
entry.getElement().classList.toggle('highlight', false);
}
}
super.onKeyDown(e);