Et2Dialog: Don't close dialog for buttons that are not in the footer

This commit is contained in:
nathan 2022-12-06 09:44:56 -07:00
parent 3971abc54b
commit 57993741cb

View File

@ -532,7 +532,7 @@ export class Et2Dialog extends Et2Widget(SlotMixin(SlDialog))
}
/**
* Only internally do our onClick on buttons
* Only internally do our onClick on buttons in the footer
* This calls _onClose() when the dialog is closed
*
* @param {MouseEvent} ev
@ -540,7 +540,7 @@ export class Et2Dialog extends Et2Widget(SlotMixin(SlDialog))
*/
_onButtonClick(ev : MouseEvent)
{
if(ev.target instanceof Et2Button)
if(ev.target instanceof Et2Button && ev.target.slot == 'footer')
{
return this._onClick(ev);
}