Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUGFIX Don't replace pushState() if emulated, as it will re-load the …

…new URL via ajax, effectively duplicating every request in IE (#7002)
  • Loading branch information...
commit 1091c7b9441e289d7f76a0d138ecaba9d0231c07 1 parent 83adffd
Ingo Schommer chillu authored
3  admin/javascript/LeftAndMain.Content.js
View
@@ -160,7 +160,8 @@
}
// Simulates a redirect on an ajax response - just exchange the URL without re-requesting it.
- if(window.History.enabled) {
+ // Causes non-pushState browser to re-request the URL, so ignore for those.
+ if(window.History.enabled && !History.emulated.pushState) {
var url = xmlhttp.getResponseHeader('X-ControllerURL');
if(url) window.History.replaceState({}, '', url);
}
10 admin/javascript/LeftAndMain.js
View
@@ -88,7 +88,8 @@ jQuery.noConflict();
$('.cms-edit-form').live('reloadeditform', function(e, data) {
// Simulates a redirect on an ajax response - just exchange the URL without re-requesting it
- if(window.History.enabled) {
+ // Causes non-pushState browser to re-request the URL, so ignore for those.
+ if(window.History.enabled && !History.emulated.pushState) {
var url = data.xmlhttp.getResponseHeader('X-ControllerURL');
if(url) window.history.replaceState({}, '', url);
}
@@ -250,12 +251,13 @@ jQuery.noConflict();
newContentEl.css('visibility', 'visible');
newContentEl.removeClass('loading');
- // Simulates a redirect on an ajax response - just exchange the URL without re-requesting it
- if(window.History.enabled) {
+ // Simulates a redirect on an ajax response - just exchange the URL without re-requesting it.
+ // Causes non-pushState browser to re-request the URL, so ignore for those.
+ if(window.History.enabled && !History.emulated.pushState) {
var url = xhr.getResponseHeader('X-ControllerURL');
if(url) window.History.replaceState({}, '', url);
}
-
+
self.trigger('afterstatechange', {data: data, status: status, xhr: xhr, element: newContentEl});
},
error: function(xhr, status, e) {
Please sign in to comment.
Something went wrong with that request. Please try again.