Close select when tabbing

This commit is contained in:
Cory LaViska
2020-07-24 09:25:09 -04:00
parent caef94339b
commit 89cce4bbb8

View File

@@ -162,10 +162,8 @@ export class Select {
}
handleMenuKeyDown(event: KeyboardEvent) {
event.stopPropagation();
// Close when escape is pressed
if (event.key === 'Escape') {
// Close when escape or tab pressed
if (event.key === 'Escape' || event.key === 'Tab') {
this.dropdown.hide();
event.preventDefault();
return;