Index: chrome/browser/resources/options/search_page.js |
diff --git a/chrome/browser/resources/options/search_page.js b/chrome/browser/resources/options/search_page.js |
index 5706863c6818fad27a63095438ccad9d70ef4375..0152017b9fae2c119308020c7dd6905107ba86ef 100644 |
--- a/chrome/browser/resources/options/search_page.js |
+++ b/chrome/browser/resources/options/search_page.js |
@@ -267,10 +267,12 @@ cr.define('options', function() { |
// Cleanup the search query string. |
text = SearchPage.canonicalizeQuery(text); |
- // Set the hash on the current page, and the enclosing uber page |
+ // Set the hash on the current page, and the enclosing uber page. Only do |
+ // this if the page is not current. See https://crbug.com/401004. |
var hash = text ? '#' + encodeURIComponent(text) : ''; |
var path = text ? this.name : ''; |
- uber.pushState({}, path + hash); |
+ if (location.hash != hash || location.pathname != '/' + path) |
+ uber.pushState({}, path + hash); |
// Toggle the search page if necessary. |
if (text) { |