Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Unified Diff: chrome/browser/resources/settings/route.js

Issue 2249933002: WebUI cr-dialog: Cancel dialog on any 'popstate' event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ensure we popstate before any route changes. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/route.js
diff --git a/chrome/browser/resources/settings/route.js b/chrome/browser/resources/settings/route.js
index 5d45fd89bb9e4f8374c311bf42869347619ab46c..412e880c39d91298bad954667e3823ad5a76597c 100644
--- a/chrome/browser/resources/settings/route.js
+++ b/chrome/browser/resources/settings/route.js
@@ -334,9 +334,8 @@ cr.define('settings', function() {
}
// History serializes the state, so we don't push the actual route object.
- var previousRoutePath = currentRoute_.path;
+ window.history.pushState(currentRoute_.path, '', url);
setCurrentRoute(route, params);
- window.history.pushState(previousRoutePath, '', url);
};
window.addEventListener('popstate', function(event) {
« no previous file with comments | « no previous file | ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698