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

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

Issue 2170223002: [MD settings] close the side nav when navigating back/forward (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/settings_ui/settings_ui.js
diff --git a/chrome/browser/resources/settings/settings_ui/settings_ui.js b/chrome/browser/resources/settings/settings_ui/settings_ui.js
index 09ad8f6de7c0162c0b2834fdb4ae1fb8e53a2e7c..4a48a510172c20620b3369b96f8ed8e142fcaa34 100644
--- a/chrome/browser/resources/settings/settings_ui/settings_ui.js
+++ b/chrome/browser/resources/settings/settings_ui/settings_ui.js
@@ -66,6 +66,17 @@ Polymer({
'sideNav.iron-activate': 'onIronActivate_',
},
+ /** @override */
+ ready: function() {
+ this.$$('cr-toolbar').addEventListener('search-changed', function(e) {
+ this.$$('settings-main').searchContents(e.detail);
+ }.bind(this));
+
+ window.addEventListener('popstate', function(e) {
+ this.$$('app-drawer').close();
+ }.bind(this));
+ },
+
/** @private */
onCloseAppealTap_: function() {
window.sessionStorage.appealClosed_ = this.appealClosed_ = true;
@@ -85,13 +96,6 @@ Polymer({
this.$$('app-drawer').toggle();
},
- /** @override */
- ready: function() {
- this.$$('cr-toolbar').addEventListener('search-changed', function(e) {
- this.$$('settings-main').searchContents(e.detail);
- }.bind(this));
- },
-
/** @private */
directionDelegateChanged_: function() {
this.$$('app-drawer').align = this.directionDelegate.isRtl() ?
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698