Chromium Code Reviews| Index: chrome/browser/resources/shared/js/cr/ui/menu_button.js |
| diff --git a/chrome/browser/resources/shared/js/cr/ui/menu_button.js b/chrome/browser/resources/shared/js/cr/ui/menu_button.js |
| index 3363babb65b5bd3f2ffa490243c1da3f9aed5566..ff81258728967d5a72272819189e15d5a334e16e 100644 |
| --- a/chrome/browser/resources/shared/js/cr/ui/menu_button.js |
| +++ b/chrome/browser/resources/shared/js/cr/ui/menu_button.js |
| @@ -100,7 +100,6 @@ cr.define('cr.ui', function() { |
| break; |
| case 'activate': |
| - case 'blur': |
|
dmazzoni
2012/09/24 17:49:06
Just checking, do we want to handle 'blur' still b
aboxhall
2012/09/24 22:39:38
This makes sense, but as I describe below, it actu
|
| case 'resize': |
| this.hideMenu(); |
| break; |
| @@ -120,6 +119,7 @@ cr.define('cr.ui', function() { |
| this.menu.hidden = false; |
| this.setAttribute('menu-shown', ''); |
| + this.menu.focusSelectedItem(); |
| // when the menu is shown we steal all keyboard events. |
| var doc = this.ownerDocument; |
| @@ -145,7 +145,7 @@ cr.define('cr.ui', function() { |
| this.menu.hidden = true; |
| this.showingEvents_.removeAll(); |
| - this.menu.selectedIndex = -1; |
| + this.focus(); |
| }, |
| /** |
| @@ -180,6 +180,7 @@ cr.define('cr.ui', function() { |
| break; |
| case 'Esc': |
| case 'U+001B': // Maybe this is remote desktop playing a prank? |
| + case 'U+0009': // Tab |
|
dmazzoni
2012/09/24 17:49:06
Specifically trapping the tab key worries me a bit
aboxhall
2012/09/24 22:39:38
So, I did have the same thought while I was workin
dmazzoni
2012/09/24 22:48:56
OK. If it isn't needed, that's fine. I'm still cur
aboxhall
2012/09/25 04:31:30
Ok, it's triggered by a mouse event at line 78 of
|
| this.hideMenu(); |
| break; |
| } |