Notebook cell and modal fix - follow up after Lucy's 14433. (#14457)

* Modal - added code to stop the keyboard event after it is handled. textCell and codeCell - onKey now fired on keydown.

* Moved stop method into the conditional with Escape key.
This commit is contained in:
Hale Rankin
2021-03-02 12:11:57 -08:00
committed by GitHub
parent 8b34e034fc
commit 3c38e0cc8b
3 changed files with 3 additions and 2 deletions

View File

@@ -472,6 +472,7 @@ export abstract class Modal extends Disposable implements IThemable {
if (event.equals(KeyCode.Enter)) {
this.onAccept(event);
} else if (event.equals(KeyCode.Escape)) {
DOM.EventHelper.stop(e, true);
this.onClose(event);
} else if (event.equals(KeyMod.Shift | KeyCode.Tab)) {
this.handleBackwardTab(e);