From 6eebabe4727fbaf5c2d9dca45e913a54b04446fd Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 1 Dec 2022 14:54:34 -0700 Subject: [PATCH] SearchMixin: Fix tag edit Double clicking just cleared the input, edit was immediately stopped due to search blur --- api/js/etemplate/Et2Select/SearchMixin.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2Select/SearchMixin.ts b/api/js/etemplate/Et2Select/SearchMixin.ts index 8c3855f028..98b87eb435 100644 --- a/api/js/etemplate/Et2Select/SearchMixin.ts +++ b/api/js/etemplate/Et2Select/SearchMixin.ts @@ -789,7 +789,9 @@ export const Et2WithSearchMixin = >(superclass async _handleSearchBlur(event : FocusEvent) { clearTimeout(this._searchTimeout); - if(event.relatedTarget && this !== (event.relatedTarget).parentElement || event.relatedTarget === null) + if(event.relatedTarget && [this, this.dropdown].indexOf((event.relatedTarget).parentElement) == -1 || + event.relatedTarget === null + ) { // Try any value they had in progress if(this._searchInputNode.value && this.allowFreeEntries) @@ -1304,6 +1306,7 @@ export const Et2WithSearchMixin = >(superclass this.dropdown.panel.setAttribute("hidden", ""); }); } + this.syncItemsFromValue(); } protected _handleSearchAbort(e)