| Index: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
|
| index 685c00b4fbba6ac07dbeb5646403cb7e904c5d0d..b5f17bbc80a192eb30a924243514284ae99bf0a3 100644
|
| --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
|
| @@ -716,13 +716,28 @@ void RecordAppLaunch(Profile* profile, GURL url) {
|
| RecordBookmarkFolderOpen([self bookmarkLaunchLocation]);
|
| showFolderMenus_ = !showFolderMenus_;
|
|
|
| - if (sender == offTheSideButton_)
|
| + // Middle click on chevron should not open bookmarks under it, instead just
|
| + // open its folder menu.
|
| + if (sender == offTheSideButton_) {
|
| [[sender cell] setStartingChildIndex:displayedButtonCount_];
|
| -
|
| + NSEvent* event = [NSApp currentEvent];
|
| + if ([event type] == NSOtherMouseUp) {
|
| + [self openOrCloseBookmarkFolderForOffTheSideButton];
|
| + return;
|
| + }
|
| + }
|
| // Toggle presentation of bar folder menus.
|
| [folderTarget_ openBookmarkFolderFromButton:sender];
|
| }
|
|
|
| +- (void)openOrCloseBookmarkFolderForOffTheSideButton {
|
| + // If clicked on already opened folder, then close it and return.
|
| + if ([folderController_ parentButton] == offTheSideButton_)
|
| + [self closeBookmarkFolder:self];
|
| + else
|
| + [self addNewFolderControllerWithParentButton:offTheSideButton_];
|
| +}
|
| +
|
| // Click on a bookmark folder button.
|
| - (IBAction)openBookmarkFolderFromButton:(id)sender {
|
| [self openBookmarkFolder:sender];
|
|
|