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

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

Issue 2427743003: MD Settings: fix double-tap to hide advanced bug (Closed)
Patch Set: nit Created 4 years, 2 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 | chrome/test/data/webui/settings/settings_ui_browsertest.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/settings_menu/settings_menu.js
diff --git a/chrome/browser/resources/settings/settings_menu/settings_menu.js b/chrome/browser/resources/settings/settings_menu/settings_menu.js
index 0dc844153140173ff42c72f05199378935609b23..fb672628d46bb92741caafc2dc76d93df4dba12f 100644
--- a/chrome/browser/resources/settings/settings_menu/settings_menu.js
+++ b/chrome/browser/resources/settings/settings_menu/settings_menu.js
@@ -29,6 +29,23 @@ Polymer({
},
},
+ ready: function() {
+ // When a <paper-submenu> is created with the [opened] attribute as true,
+ // its _active member isn't correctly initialized. See this bug for more
+ // info: https://github.com/PolymerElements/paper-menu/issues/88. This means
+ // the first tap to close an opened Advanced section does nothing (because
+ // it calls .open() on an opened menu instead of .close(). This is a fix for
+ // that bug without changing that code through its public API.
+ //
+ // TODO(dbeam): we're currently deciding whether <paper-{,sub}menu> are
+ // right for our needs (there have been minor a11y problems). If we decide
+ // to keep <paper-{,sub}menu>, fix this bug with a local Chrome CL (ex:
+ // https://codereview.chromium.org/2412343004) or a Polymer PR (ex:
+ // https://github.com/PolymerElements/paper-menu/pull/107).
+ if (this.advancedOpened)
+ this.$.advancedPage.open();
+ },
+
/**
* @param {!settings.Route} newRoute
*/
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/settings_ui_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698