From 3f9518f0a7e49ec259299093ae63f7de5b2f430e Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Thu, 12 Jul 2012 05:25:22 -0400 Subject: [PATCH] Merge branch 'release-0.8' of github.com:roundcube/roundcubemail into release-0.8 --- program/js/app.js | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 8d02f6f..ae9f4e97 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -60,6 +60,8 @@ beforeSend: function(xmlhttp){ xmlhttp.setRequestHeader('X-Roundcube-Request', ref.env.request_token); } }); + $(window).bind('beforeunload', function() { rcmail.unload = true; }); + // set environment variable(s) this.set_env = function(p, value) { @@ -6129,6 +6131,10 @@ this.set_busy(false, null, lock); request.abort(); + // don't display error message on page unload (#1488547) + if (this.unload) + return; + if (request.status && errmsg) this.display_message(this.get_label('servererror') + ' (' + errmsg + ')', 'error'); else if (status == 'timeout') -- Gitblit v1.9.1