Index: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm |
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm |
index 6154cb8069d2e45dd2e819831930db031dd51ee2..2eb0880c5f79ed46df5d53ad068412a2a6691471 100644 |
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm |
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm |
@@ -1334,10 +1334,15 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) { |
if ([folderController_ parentButton] == sender) |
return; |
- [self performSelector:@selector(openBookmarkFolderFromButtonAndCloseOldOne:) |
- withObject:sender |
- afterDelay:bookmarks::kHoverOpenDelay |
- inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]]; |
+ // If right click was done immediately on entering a button, then open the |
+ // folder without delay so that context menu appears over the folder menu. |
+ if ([event type] == NSRightMouseDown) |
+ [self openBookmarkFolderFromButtonAndCloseOldOne:sender]; |
+ else |
+ [self performSelector:@selector(openBookmarkFolderFromButtonAndCloseOldOne:) |
+ withObject:sender |
+ afterDelay:bookmarks::kHoverOpenDelay |
+ inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]]; |
} |
// Called from the BookmarkButton |