Index: chrome/browser/ui/cocoa/extensions/browser_action_button.mm |
diff --git a/chrome/browser/ui/cocoa/extensions/browser_action_button.mm b/chrome/browser/ui/cocoa/extensions/browser_action_button.mm |
index c6d78b817191603aca4fdb945c55d5cb298211aa..889f544b5b7c48706534932c076334eee3a3e726 100644 |
--- a/chrome/browser/ui/cocoa/extensions/browser_action_button.mm |
+++ b/chrome/browser/ui/cocoa/extensions/browser_action_button.mm |
@@ -181,9 +181,13 @@ class ExtensionActionIconFactoryBridge |
} |
- (void)mouseDown:(NSEvent*)theEvent { |
- [[self cell] setHighlighted:YES]; |
- dragCouldStart_ = YES; |
- dragStartPoint_ = [theEvent locationInWindow]; |
+ NSPoint location = [self convertPoint:[theEvent locationInWindow] |
+ fromView:nil]; |
+ if (NSPointInRect(location, [self bounds])) { |
+ [[self cell] setHighlighted:YES]; |
+ dragCouldStart_ = YES; |
+ dragStartPoint_ = [theEvent locationInWindow]; |
+ } |
} |
- (void)mouseDragged:(NSEvent*)theEvent { |