Skip to content
Closed
Changes from all commits
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
4 changes: 4 additions & 0 deletions src/material/select/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,10 @@ export class MatSelect
hasDeselectedOptions ? option.select() : option.deselect();
}
});
} else if (event.keyCode === ESCAPE && !hasModifierKey(event)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this would fix the issue at the moment, we have a TODO to move all of this logic into _handleOverlayKeydown for better interop with the rest of the overlays. Once that happens the sidenav use case will break again so I'm not sure we should land the change just to have it regress later.

event.stopPropagation();
event.preventDefault();
this.close();
} else {
const previouslyFocusedIndex = manager.activeItemIndex;

Expand Down
Loading