From 973ce140d4ddb22423c927e93c5bca494f84cad2 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 27 Nov 2023 14:54:55 -0700 Subject: [PATCH] Try waiting for updateComplete before sending focus to search input Maybe fixes search field doesn't get focus when clicking on select --- api/js/etemplate/Et2Select/SearchMixin.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Select/SearchMixin.ts b/api/js/etemplate/Et2Select/SearchMixin.ts index 9e1bd31e37..e049b9d9c5 100644 --- a/api/js/etemplate/Et2Select/SearchMixin.ts +++ b/api/js/etemplate/Et2Select/SearchMixin.ts @@ -743,8 +743,11 @@ export const Et2WithSearchMixin = dedupeMixin( { if(this.searchEnabled || this.allowFreeEntries) { - this._searchInputNode.focus(); - this._searchInputNode.select(); + this.updateComplete.then(() => + { + this._searchInputNode.focus(); + this._searchInputNode.select(); + }); } return; // Need to give positioner a chance to position.