Commit 33900453 authored by gajendra.n's avatar gajendra.n Committed by Commit bot

Bookmark context menu should appear over the bookmark folder menu.

If user right clicks immediately on entering a bookmark button, then open the
folder without delay so that context menu appears over the folder menu.

BUG=168758
R=asvitkine@chromium.org

TEST=
1. Add a bookmark folder to Bookmarks Bar (folder1).
2. Add a subfolder (folder2) inside folder1.
3. Add few bookmarks to folder2.
4. Click on folder1 and immediately right click on folder2 and observe.
5. Context Menu should appear over the folder menu (folder contents window).

Review URL: https://codereview.chromium.org/581053002

Cr-Commit-Position: refs/heads/master@{#295655}
parent c0017171
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment