Commit 895978ba authored by aboxhall@chromium.org's avatar aboxhall@chromium.org

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
parent 8b6d9644
...@@ -297,4 +297,5 @@ html[dir='rtl'] .entry .title { ...@@ -297,4 +297,5 @@ html[dir='rtl'] .entry .title {
#action-menu > :not(hr) { #action-menu > :not(hr) {
line-height: 29px; line-height: 29px;
outline: none;
} }
...@@ -155,8 +155,6 @@ cr.define('cr.ui', function() { ...@@ -155,8 +155,6 @@ cr.define('cr.ui', function() {
this.menu.hidden = false; this.menu.hidden = false;
this.setAttribute('menu-shown', ''); this.setAttribute('menu-shown', '');
if (shouldSetFocus)
this.menu.focusSelectedItem();
// When the menu is shown we steal all keyboard events. // When the menu is shown we steal all keyboard events.
var doc = this.ownerDocument; var doc = this.ownerDocument;
...@@ -167,6 +165,9 @@ cr.define('cr.ui', function() { ...@@ -167,6 +165,9 @@ cr.define('cr.ui', function() {
this.showingEvents_.add(win, 'resize', this); this.showingEvents_.add(win, 'resize', this);
this.showingEvents_.add(this.menu, 'activate', this); this.showingEvents_.add(this.menu, 'activate', this);
this.positionMenu_(); this.positionMenu_();
if (shouldSetFocus)
this.menu.focusSelectedItem();
}, },
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment