Thomas Bruederli
2012-07-06 8fdb332a20fec1988a6ec76fc83c3a4eb28ed1c8
Fix connection error alerts when page unloads (#1488547)
2 files modified
7 ■■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
program/js/app.js 6 ●●●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Fix 'no connection' errors on page unloads (#1488547)
- Plugin API: Add 'unauthenticated' hook (#1488138)
- Show explicit error message when provided hostname is invalid (#1488550)
- Fix wrong compose screen elements focus in IE9 (#1488541)
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')