mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-04 12:30:04 +01:00
Et2Select: Fix keyboard navigation in search results & sidebox category closes
This commit is contained in:
parent
5614870a29
commit
8de9ffc240
@ -269,7 +269,7 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
|
||||
this.addEventListener("mousewheel", this._handleMouseWheel);
|
||||
this.addEventListener("mouseenter", this._handleMouseEnter);
|
||||
this.addEventListener("mouseup", this.handleOptionClick);
|
||||
this.addEventListener("keyup", this.handleKeyDown);
|
||||
this.addEventListener("keydown", this.handleKeyDown);
|
||||
|
||||
this.updateComplete.then(() =>
|
||||
{
|
||||
@ -710,6 +710,7 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
|
||||
this.handleMenuHide();
|
||||
}
|
||||
});
|
||||
event.stopPropagation();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -884,7 +884,10 @@ export const Et2WithSearchMixin = <T extends Constructor<LitElement>>(superclass
|
||||
// Pass off some keys to select
|
||||
if(['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key))
|
||||
{
|
||||
return this.handleKeyDown(event);
|
||||
|
||||
// Strip out hidden non-matching selected & disabled items so key navigation works
|
||||
this.menuItems = this.menuItems.filter(i => !i.disabled);
|
||||
return super.handleKeyDown(event);
|
||||
}
|
||||
event.stopPropagation();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user