diff options
author | aboxhall@chromium.org <aboxhall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-01 03:37:56 +0000 |
---|---|---|
committer | aboxhall@chromium.org <aboxhall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-01 03:37:56 +0000 |
commit | 895978babb24776cfb1aeef22fe55241e15e1891 (patch) | |
tree | c6a79c381554909ddcd2170c35c0d6e2bc1b5cad /ui | |
parent | 8b6d9644a2fe81b761934e35a5d1d3a9b40b5db5 (diff) | |
download | chromium_src-895978babb24776cfb1aeef22fe55241e15e1891.zip chromium_src-895978babb24776cfb1aeef22fe55241e15e1891.tar.gz chromium_src-895978babb24776cfb1aeef22fe55241e15e1891.tar.bz2 |
Move focusSelectedItem to the end of showMenu() as it can cause the page to scroll prematurely.
Also add outline: none to menu items in the drop-down menus on the history page, as the focus is indicated by the colour.
BUG=172816
Review URL: https://chromiumcodereview.appspot.com/12091099
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180059 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/webui/resources/js/cr/ui/menu_button.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/webui/resources/js/cr/ui/menu_button.js b/ui/webui/resources/js/cr/ui/menu_button.js index f4fca43..54b77df 100644 --- a/ui/webui/resources/js/cr/ui/menu_button.js +++ b/ui/webui/resources/js/cr/ui/menu_button.js @@ -155,8 +155,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; @@ -167,6 +165,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(); }, /** |