Clean up etemplate2 sessions before closing the top level window

This commit is contained in:
hadi 2023-09-22 16:11:14 +02:00
parent 534e1b5d72
commit a00fdb9eb2

View File

@ -453,6 +453,10 @@ export class etemplate2
this.close_prompt = this._close_changed_prompt.bind(this); this.close_prompt = this._close_changed_prompt.bind(this);
window.addEventListener("beforeunload", this.close_prompt); window.addEventListener("beforeunload", this.close_prompt);
} }
else if (window == egw_topWindow())
{
window.addEventListener("beforeunload", this.destroy_session);
}
if(this._etemplate_exec_id) if(this._etemplate_exec_id)
{ {
this.destroy_session = jQuery.proxy(function(ev) this.destroy_session = jQuery.proxy(function(ev)