Index: ui/webui/resources/js/cr/ui/menu_button.js |
diff --git a/ui/webui/resources/js/cr/ui/menu_button.js b/ui/webui/resources/js/cr/ui/menu_button.js |
index bc86858ed1cefc7abddb849a4aeeebfb82e3ab92..0649f7d5020b2a1de10208df1879679979583790 100644 |
--- a/ui/webui/resources/js/cr/ui/menu_button.js |
+++ b/ui/webui/resources/js/cr/ui/menu_button.js |
@@ -162,8 +162,6 @@ cr.define('cr.ui', function() { |
this.menu.hidden = false; |
this.setAttribute('menu-shown', ''); |
- if (shouldSetFocus) |
- this.menu.focusSelectedItem(); |
// When the menu is shown we steal all keyboard events. |
var doc = this.ownerDocument; |
@@ -174,6 +172,9 @@ cr.define('cr.ui', function() { |
this.showingEvents_.add(win, 'resize', this); |
this.showingEvents_.add(this.menu, 'activate', this); |
this.positionMenu_(); |
+ |
+ if (shouldSetFocus) |
+ this.menu.focusSelectedItem(); |
}, |
/** |