mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-16 03:34:48 +02:00
fix error on window closing in Chrome 80+
caused by Chrome 80+ no longer allowing to send a synchronious ajax request from beforeunload handler, using sendBeacon (async request with keepalive=true) instead
This commit is contained in:
@ -285,9 +285,9 @@ etemplate2.prototype.bind_unload = function()
|
||||
{
|
||||
this.destroy_session = jQuery.proxy(function(ev)
|
||||
{
|
||||
var request = egw.json("EGroupware\\Api\\Etemplate::ajax_destroy_session",
|
||||
[this.etemplate_exec_id], null, null, false);
|
||||
request.sendRequest();
|
||||
// need to use async === "keepalive" to run via beforeunload
|
||||
egw.json("EGroupware\\Api\\Etemplate::ajax_destroy_session",
|
||||
[this.etemplate_exec_id], null, null, "keepalive").sendRequest();
|
||||
}, this);
|
||||
|
||||
if (!window.onbeforeunload)
|
||||
|
Reference in New Issue
Block a user