Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fixing how escape key works in listWidget
  • Loading branch information
aasimkhan30 committed Nov 16, 2020
commit 5a1b424614c5ac1b7b7676ff4d3c268aeb96814d
10 changes: 6 additions & 4 deletions src/vs/base/browser/ui/list/listWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,12 @@ class KeyboardController<T> implements IDisposable {
}

private onEscape(e: StandardKeyboardEvent): void {
e.preventDefault();
e.stopPropagation();
this.list.setSelection([], e.browserEvent);
this.view.domNode.focus();
if (this.list.getSelection().length) {
e.preventDefault();
e.stopPropagation();
this.list.setSelection([], e.browserEvent);
this.view.domNode.focus();
}
}

dispose() {
Expand Down