Index: ui/views/controls/button/menu_button.cc |
diff --git a/ui/views/controls/button/menu_button.cc b/ui/views/controls/button/menu_button.cc |
index 3395b420ff373bbc4982e535ef6e6fafd5e560bf..680ed95537ec2274b91a1d45f35a104ad0be9e0b 100644 |
--- a/ui/views/controls/button/menu_button.cc |
+++ b/ui/views/controls/button/menu_button.cc |
@@ -181,7 +181,8 @@ bool MenuButton::OnMousePressed(const MouseEvent& event) { |
if (state() != BS_DISABLED) { |
// If we're draggable (GetDragOperations returns a non-zero value), then |
// don't pop on press, instead wait for release. |
- if (event.IsOnlyLeftMouseButton() && HitTest(event.location()) && |
+ if (event.IsOnlyLeftMouseButton() && |
+ HitTest(gfx::Rect(event.location(), gfx::Size(0, 0))) && |
GetDragOperations(event.location()) == ui::DragDropTypes::DRAG_NONE) { |
TimeDelta delta = Time::Now() - menu_closed_time_; |
int64 delta_in_milliseconds = delta.InMilliseconds(); |
@@ -200,7 +201,7 @@ void MenuButton::OnMouseReleased(const MouseEvent& event) { |
// triggerable and there's a context menu). |
if (GetDragOperations(event.location()) != ui::DragDropTypes::DRAG_NONE && |
state() != BS_DISABLED && !InDrag() && event.IsOnlyLeftMouseButton() && |
- HitTest(event.location())) { |
+ HitTest(gfx::Rect(event.location(), gfx::Size(0, 0)))) { |
Activate(); |
} else { |
TextButton::OnMouseReleased(event); |