diff --git a/javascript/GridField.js b/javascript/GridField.js index 746f6fbf6..cd08d31be 100644 --- a/javascript/GridField.js +++ b/javascript/GridField.js @@ -22,6 +22,14 @@ if(window.location.search) { ajaxOpts.data = window.location.search.replace(/^\?/, '') + '&' + $.param(ajaxOpts.data); } + + // For browsers which do not support history.pushState like IE9, ss framework uses hash to track + // the current location for PJAX, so for them we pass the query string stored in the hash instead + if(!window.history || !window.history.pushState){ + if(window.location.hash && window.location.hash.indexOf('?') != -1){ + ajaxOpts.data = window.location.hash.substring(window.location.hash.indexOf('?') + 1) + '&' + $.param(ajaxOpts.data); + } + } form.addClass('loading');