From 55116c7b49a10acd9793e35ed77d2f58cd1ec4cf Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 4 Apr 2023 10:12:48 -0600 Subject: [PATCH] Et2Select: Fix select closes immediately after opening If you click to open then click again to close, select wouldn't stay open after that. --- api/js/etemplate/Et2Select/Et2Select.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/js/etemplate/Et2Select/Et2Select.ts b/api/js/etemplate/Et2Select/Et2Select.ts index 981ddd4504..737467af41 100644 --- a/api/js/etemplate/Et2Select/Et2Select.ts +++ b/api/js/etemplate/Et2Select/Et2Select.ts @@ -688,6 +688,11 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect) */ private handleOptionClick(event : MouseEvent) { + if(event.target == this) + { + // Don't hide dropdown when clicking on select. That can close it after user opens it. + return; + } this.dropdown.hide().then(() => { if(typeof this.handleMenuHide == "function")