diff options
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/chromeos/views/native_menu_domui.cc | 2 | ||||
-rw-r--r-- | chrome/browser/resources/menu.js | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/chromeos/views/native_menu_domui.cc b/chrome/browser/chromeos/views/native_menu_domui.cc index 1cd68f1..42ca581 100644 --- a/chrome/browser/chromeos/views/native_menu_domui.cc +++ b/chrome/browser/chromeos/views/native_menu_domui.cc @@ -231,7 +231,7 @@ bool NativeMenuDOMUI::Dispatch(GdkEvent* event) { NativeMenuDOMUI* target = FindMenuAt( gfx::Point(event->motion.x_root, event->motion.y_root)); if (target) - target->menu_widget_->EnableInput(true); + target->menu_widget_->EnableInput(false); break; } case GDK_BUTTON_PRESS: { diff --git a/chrome/browser/resources/menu.js b/chrome/browser/resources/menu.js index f843e656..0dffad4 100644 --- a/chrome/browser/resources/menu.js +++ b/chrome/browser/resources/menu.js @@ -72,7 +72,8 @@ MenuItem.prototype = { activate: function() { if (this.attrs.type == 'submenu') { this.menu_.openSubmenu(this); - } else if (this.attrs.type != 'separator') { + } else if (this.attrs.type != 'separator' && + this.div.className.indexOf('selected') >= 0) { sendClick(this.id); } }, @@ -356,7 +357,10 @@ Menu.prototype = { onMouseover_: function(event, item) { this.cancelSubmenuTimer_(); - if (this.current_ != item && item.attrs.enabled) { + // Ignore false mouseover event at (0,0) which is + // emitted when opening submenu. + if (item.attrs.enabled && + (event.x != 0 && event.y != 0)) { item.select(); } }, @@ -364,7 +368,6 @@ Menu.prototype = { onMouseout_: function(event) { if (this.current_) { this.current_.unselect(); - this.current_ = null; } }, @@ -388,7 +391,6 @@ Menu.prototype = { if (!this.is_root) { if (this.current_) { this.current_.unselect(); - this.current_ = null; } chrome.send('move_to_parent', []); } |