mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 20:01:36 +02:00
Et2Select: Fix keyboard navigation in search results & sidebox category closes
This commit is contained in:
parent
6b3acd3af8
commit
ee758d3069
@ -269,7 +269,7 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
|
|||||||
this.addEventListener("mousewheel", this._handleMouseWheel);
|
this.addEventListener("mousewheel", this._handleMouseWheel);
|
||||||
this.addEventListener("mouseenter", this._handleMouseEnter);
|
this.addEventListener("mouseenter", this._handleMouseEnter);
|
||||||
this.addEventListener("mouseup", this.handleOptionClick);
|
this.addEventListener("mouseup", this.handleOptionClick);
|
||||||
this.addEventListener("keyup", this.handleKeyDown);
|
this.addEventListener("keydown", this.handleKeyDown);
|
||||||
|
|
||||||
this.updateComplete.then(() =>
|
this.updateComplete.then(() =>
|
||||||
{
|
{
|
||||||
@ -710,6 +710,7 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
|
|||||||
this.handleMenuHide();
|
this.handleMenuHide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
event.stopPropagation();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -884,7 +884,10 @@ export const Et2WithSearchMixin = <T extends Constructor<LitElement>>(superclass
|
|||||||
// Pass off some keys to select
|
// Pass off some keys to select
|
||||||
if(['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key))
|
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();
|
event.stopPropagation();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user