forked from extern/egroupware
SearchMixin: If user enters a valid free entry then changes focus without pressing Tab or Enter key, accept the free entry
This commit is contained in:
parent
0ecfdd8bdf
commit
404a29b985
@ -789,9 +789,15 @@ export const Et2WithSearchMixin = <T extends Constructor<LitElement>>(superclass
|
||||
async _handleSearchBlur(event : FocusEvent)
|
||||
{
|
||||
clearTimeout(this._searchTimeout);
|
||||
if(event.relatedTarget && this !== (<Element>event.relatedTarget).parentElement)
|
||||
if(event.relatedTarget && this !== (<Element>event.relatedTarget).parentElement || event.relatedTarget === null)
|
||||
{
|
||||
// Try any value they had in progress
|
||||
if(this._searchInputNode.value && this.allowFreeEntries)
|
||||
{
|
||||
this.createFreeEntry(this._searchInputNode.value);
|
||||
}
|
||||
await this.dropdown.hide();
|
||||
this.clearSearch();
|
||||
if(event.relatedTarget && event.relatedTarget !== this)
|
||||
{
|
||||
event.relatedTarget.focus();
|
||||
|
Loading…
Reference in New Issue
Block a user