From bd62279f554dfb5a5347b6cb76a667be28efe385 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 17 Oct 2022 09:56:58 -0600 Subject: [PATCH] Et2Select: Cancel search timer on blur and menu close If we don't, results might come back after we leave/close and re-open --- api/js/etemplate/Et2Select/SearchMixin.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/js/etemplate/Et2Select/SearchMixin.ts b/api/js/etemplate/Et2Select/SearchMixin.ts index 52798da2dc..60d74a0ef2 100644 --- a/api/js/etemplate/Et2Select/SearchMixin.ts +++ b/api/js/etemplate/Et2Select/SearchMixin.ts @@ -655,6 +655,7 @@ export const Et2WithSearchMixin = >(superclass { return; } + clearTimeout(this._searchTimeout); super.handleMenuHide(); // Reset display @@ -787,6 +788,7 @@ export const Et2WithSearchMixin = >(superclass */ async _handleSearchBlur(event : FocusEvent) { + clearTimeout(this._searchTimeout); if(event.relatedTarget && this !== (event.relatedTarget).parentElement) { await this.dropdown.hide();