Et2Select: Fix select closes immediately after opening

If you click to open then click again to close, select wouldn't stay open after that.
This commit is contained in:
nathan 2023-04-04 10:12:48 -06:00
parent 7dfb0f734f
commit 55116c7b49

View File

@ -688,6 +688,11 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
*/ */
private handleOptionClick(event : MouseEvent) 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(() => this.dropdown.hide().then(() =>
{ {
if(typeof this.handleMenuHide == "function") if(typeof this.handleMenuHide == "function")