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

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

Issue 2300753004: MD Settings menu should be visible (Closed)
Patch Set: feedback Created 4 years, 3 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
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 61f75181fc068982fd9970aea9b49a26e6431cbe..bd0a58929697ed3de3244cd912f7bcddf2a63724 100644
--- a/chrome/browser/resources/settings/settings_ui/settings_ui.js
+++ b/chrome/browser/resources/settings/settings_ui/settings_ui.js
@@ -36,9 +36,6 @@ Polymer({
* @private {!GuestModePageVisibility}
*/
pageVisibility_: Object,
-
- /** @private */
- drawerOpened_: Boolean,
},
/**
@@ -51,6 +48,11 @@ Polymer({
this.$$('settings-main').searchContents(e.detail);
}.bind(this));
+ // Lazy-create the drawer the first time it is opened or swiped into view.
+ var drawer = assert(this.$$('app-drawer'));
+ listenOnce(
+ drawer, 'track opened-changed', this.onDrawerFirstShown_.bind(this));
Dan Beam 2016/09/01 03:02:01 nit: listenOnce(this.$$('app-drawer'), 'track ope
michaelpg 2016/09/07 00:30:26 Done.
+
window.addEventListener('popstate', function(e) {
this.$$('app-drawer').close();
}.bind(this));
@@ -109,4 +111,13 @@ Polymer({
this.$$('app-drawer').align = this.directionDelegate.isRtl() ?
'right' : 'left';
},
+
+ /**
+ * Ensures the settings-menu in the app-drawer is stamped.
+ * @param {!Event} e
+ * @private
+ */
+ onDrawerFirstShown_: function(e) {
+ this.$.drawerTemplate.if = true;
+ },
});

Powered by Google App Engine
This is Rietveld 408576698