mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-15 12:34:33 +01:00
Et2SelectEmail: Fix keyboard navigation in search results
This commit is contained in:
parent
6cea4bae6d
commit
5872b77606
@ -115,6 +115,24 @@ export class Et2SelectEmail extends Et2Select
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle keypresses inside the search input
|
||||
* Overridden from parent to also skip the hidden selected options, which other selects do not do
|
||||
*
|
||||
* @param {KeyboardEvent} event
|
||||
* @protected
|
||||
*/
|
||||
protected _handleSearchKeyDown(event : KeyboardEvent)
|
||||
{
|
||||
// Pass off some keys to select
|
||||
if(['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key))
|
||||
{
|
||||
// Strip out hidden non-matching selected so key navigation works
|
||||
this.menuItems = this.menuItems.filter(i => !i.checked);
|
||||
}
|
||||
return super._handleSearchKeyDown(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually query the server.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user