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

Unified Diff: ui/webui/resources/cr_elements/cr_shared_menu/cr_shared_menu.js

Issue 2142893005: MD Settings: Update passwords section for new cr-shared-menu features (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 | « chrome/browser/resources/settings/passwords_and_forms_page/passwords_shared_css.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/cr_elements/cr_shared_menu/cr_shared_menu.js
diff --git a/ui/webui/resources/cr_elements/cr_shared_menu/cr_shared_menu.js b/ui/webui/resources/cr_elements/cr_shared_menu/cr_shared_menu.js
index e08fd0d10d43d197a45af4e9ad8909037107e120..7dfdd31faec7d90d477a53a60744874007deaca1 100644
--- a/ui/webui/resources/cr_elements/cr_shared_menu/cr_shared_menu.js
+++ b/ui/webui/resources/cr_elements/cr_shared_menu/cr_shared_menu.js
@@ -113,14 +113,6 @@ Polymer({
/** @override */
attached: function() {
window.addEventListener('resize', this.closeMenu.bind(this));
-
- var focusableChildren = Polymer.dom(this).querySelectorAll(
- '[tabindex],button');
- if (focusableChildren.length > 0) {
- this.$.dropdown.focusTarget = focusableChildren[0];
- this.firstFocus_ = focusableChildren[0];
- this.lastFocus_ = focusableChildren[focusableChildren.length - 1];
- }
},
/** Closes the menu. */
@@ -143,6 +135,14 @@ Polymer({
this.itemData = itemData;
this.lastAnchor_ = anchor;
+ var focusableChildren = Polymer.dom(this).querySelectorAll(
+ '[tabindex]:not([hidden]),button:not([hidden])');
Dan Beam 2016/07/14 17:09:20 and it starts growing
tsergeant 2016/07/15 01:17:48 https://www.youtube.com/watch?v=bWcASV2sey0 https
+ if (focusableChildren.length > 0) {
+ this.$.dropdown.focusTarget = focusableChildren[0];
+ this.firstFocus_ = focusableChildren[0];
+ this.lastFocus_ = focusableChildren[focusableChildren.length - 1];
+ }
+
// Move the menu to the anchor.
this.$.dropdown.positionTarget = anchor;
this.menuOpen = true;
« no previous file with comments | « chrome/browser/resources/settings/passwords_and_forms_page/passwords_shared_css.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698