diff --git a/src/wp-admin/js/revisions.js b/src/wp-admin/js/revisions.js index 5d3fe906b1..2949c49b6d 100644 --- a/src/wp-admin/js/revisions.js +++ b/src/wp-admin/js/revisions.js @@ -411,6 +411,9 @@ window.wp = window.wp || {}; // Start the router if browser supports History API if ( window.history && window.history.pushState ) { this.router = new revisions.Router({ model: this }); + if ( Backbone.History.started ) { + Backbone.history.stop(); + } Backbone.history.start({ pushState: true }); } }, diff --git a/src/wp-admin/js/theme.js b/src/wp-admin/js/theme.js index 159c6778d1..f919067329 100644 --- a/src/wp-admin/js/theme.js +++ b/src/wp-admin/js/theme.js @@ -1431,6 +1431,9 @@ themes.Run = { this.view.render(); this.routes(); + if ( Backbone.History.started ) { + Backbone.history.stop(); + } Backbone.history.start({ root: themes.data.settings.adminUrl, pushState: true, @@ -1884,6 +1887,9 @@ themes.RunInstaller = { this.view.render(); this.routes(); + if ( Backbone.History.started ) { + Backbone.history.stop(); + } Backbone.history.start({ root: themes.data.settings.adminUrl, pushState: true, diff --git a/src/wp-includes/js/media-grid.js b/src/wp-includes/js/media-grid.js index 5d0faa25f4..f0831fb3bb 100644 --- a/src/wp-includes/js/media-grid.js +++ b/src/wp-includes/js/media-grid.js @@ -844,6 +844,9 @@ Manage = MediaFrame.extend({ startHistory: function() { // Verify pushState support and activate if ( window.history && window.history.pushState ) { + if ( Backbone.History.started ) { + Backbone.history.stop(); + } Backbone.history.start( { root: window._wpMediaGridSettings.adminUrl, pushState: true diff --git a/src/wp-includes/js/media/views/frame/manage.js b/src/wp-includes/js/media/views/frame/manage.js index 5dd09a9b79..2b634331f3 100644 --- a/src/wp-includes/js/media/views/frame/manage.js +++ b/src/wp-includes/js/media/views/frame/manage.js @@ -259,6 +259,9 @@ Manage = MediaFrame.extend({ startHistory: function() { // Verify pushState support and activate if ( window.history && window.history.pushState ) { + if ( Backbone.History.started ) { + Backbone.history.stop(); + } Backbone.history.start( { root: window._wpMediaGridSettings.adminUrl, pushState: true