From 68776bd079c11558aaf0b8c2a9a71a7df6974383 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 16 Apr 2014 00:03:57 +0000 Subject: [PATCH] Theme Installer: Fixes for browsers without pushState. props gcorne. see #27055. git-svn-id: https://develop.svn.wordpress.org/trunk@28141 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/theme.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/wp-admin/js/theme.js b/src/wp-admin/js/theme.js index 3a96d1ab4b..0b5232822e 100644 --- a/src/wp-admin/js/theme.js +++ b/src/wp-admin/js/theme.js @@ -1175,6 +1175,12 @@ themes.Router = Backbone.Router.extend({ themes: function() { $( '.theme-search' ).val( '' ); + }, + + navigate: function() { + if ( Backbone.history._hasPushState ) { + Backbone.Router.navigate.apply( this, arguments ); + } } }); @@ -1572,6 +1578,12 @@ themes.InstallerRouter = Backbone.Router.extend({ search: function( query ) { $( '.theme-search' ).val( query ); + }, + + navigate: function() { + if ( Backbone.history._hasPushState ) { + Backbone.Router.navigate.apply( this, arguments ); + } } });