mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:18:57 +01:00
Et2Email: Fix validation message for invalid search text did not always show on field blur
This commit is contained in:
parent
bb4f055e71
commit
3acbd1401f
@ -215,7 +215,7 @@ export class Et2Email extends Et2InputWidget(LitElement) implements SearchMixinI
|
|||||||
this.open = false;
|
this.open = false;
|
||||||
this._valueUID = this.egw().uid();
|
this._valueUID = this.egw().uid();
|
||||||
this.updateComplete.then(() => this.makeSortable());
|
this.updateComplete.then(() => this.makeSortable());
|
||||||
document.addEventListener('focusin', this.handleLostFocus);
|
document.addEventListener('focusout', this.handleLostFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnectedCallback()
|
disconnectedCallback()
|
||||||
@ -226,7 +226,7 @@ export class Et2Email extends Et2InputWidget(LitElement) implements SearchMixinI
|
|||||||
{
|
{
|
||||||
this._sortable.destroy();
|
this._sortable.destroy();
|
||||||
}
|
}
|
||||||
document.removeEventListener('focusin', this.handleLostFocus);
|
document.removeEventListener('focusout', this.handleLostFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
willUpdate(changedProperties : PropertyValues)
|
willUpdate(changedProperties : PropertyValues)
|
||||||
@ -587,10 +587,6 @@ export class Et2Email extends Et2InputWidget(LitElement) implements SearchMixinI
|
|||||||
* @param {MouseEvent} event
|
* @param {MouseEvent} event
|
||||||
*/
|
*/
|
||||||
private handleLostFocus = (event : MouseEvent | KeyboardEvent) =>
|
private handleLostFocus = (event : MouseEvent | KeyboardEvent) =>
|
||||||
{
|
|
||||||
// Close when clicking outside of the component
|
|
||||||
const path = event.composedPath();
|
|
||||||
if(this && !path.includes(this))
|
|
||||||
{
|
{
|
||||||
// If they had something OK typed, use it
|
// If they had something OK typed, use it
|
||||||
if(this.addAddress(this._search.value.trim()))
|
if(this.addAddress(this._search.value.trim()))
|
||||||
@ -607,7 +603,6 @@ export class Et2Email extends Et2InputWidget(LitElement) implements SearchMixinI
|
|||||||
this.value = currentValue;
|
this.value = currentValue;
|
||||||
}
|
}
|
||||||
this.hide();
|
this.hide();
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
async handleOpenChange()
|
async handleOpenChange()
|
||||||
|
Loading…
Reference in New Issue
Block a user