Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUGFIX Force full window reload on IE7/IE8 every 20 pushState request…

…s (see #7258)
  • Loading branch information...
commit ecb48bb57c3b9ce42f527f2aaca638e89b6d30c0 1 parent 7ba759e
@chillu chillu authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 admin/javascript/LeftAndMain.js
View
11 admin/javascript/LeftAndMain.js
@@ -69,6 +69,8 @@ jQuery.noConflict();
$('.cms-container').entwine({
CurrentXHR: null,
+
+ StateChangeCount: 0,
/**
* Constructor: onmatch
@@ -285,6 +287,15 @@ jQuery.noConflict();
var self = this, h = window.History, state = h.getState(),
fragments = state.data.pjax || 'Content', headers = {},
contentEls = this._findFragments(fragments.split(','));
+
+ // For legacy IE versions (IE7 and IE8), reload without ajax
+ // as a crude way to fix memory leaks through whole window refreshes.
+ this.setStateChangeCount(this.getStateChangeCount() + 1);
+ var isLegacyIE = ($.browser.msie && parseInt($.browser.version, 10) < 9);
+ if(isLegacyIE && this.getStateChangeCount() > 20) {
+ document.location.href = state.url;
+ return;
+ }
this.trigger('beforestatechange', {state: state, element: contentEls});
Please sign in to comment.
Something went wrong with that request. Please try again.