Index: ui/views/controls/menu/menu_runner.cc |
diff --git a/ui/views/controls/menu/menu_runner.cc b/ui/views/controls/menu/menu_runner.cc |
index 694503cc3fc3cd3b54ccb05eceef551ca88e76d5..c7ed7a3b8032cf19a731a1440f8257bfe312d928 100644 |
--- a/ui/views/controls/menu/menu_runner.cc |
+++ b/ui/views/controls/menu/menu_runner.cc |
@@ -341,6 +341,12 @@ MenuRunner::RunResult MenuRunner::RunMenuAt(Widget* parent, |
anchor = parent->GetCurrentEvent()->IsGestureEvent() ? |
MenuItemView::BOTTOMCENTER : MenuItemView::TOPLEFT; |
+ // If we are shown on mouse press, we will eat the subsequent mouse down and |
+ // the parent widget will not be able to reset its state (it might have mouse |
+ // capture from the mouse down). So we clear its state here. |
+ if (parent && parent->GetRootView()) |
+ parent->GetRootView()->SetMouseHandler(NULL); |
sky
2013/03/20 21:35:53
This means a view isn't going to get a mouse exite
varunjain
2013/03/20 22:05:52
SetMouseHandler(NULL) does not reset the mouse_mov
|
+ |
return holder_->RunMenuAt(parent, button, bounds, anchor, types); |
} |