Skip to content

Commit

Permalink
Mac. Make command key combinations close bookmark folder menus.
Browse files Browse the repository at this point in the history
BUG=87941
TEST=On Mac, click on a bookmark folder in the bar to open the menu, verify the menu closes when you hit cmd-T to open a new tab.
Review URL: http://codereview.chromium.org/7316004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91593 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
maf@chromium.org committed Jul 6, 2011
1 parent 4c466fc commit dbe9778
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1803,19 +1803,19 @@ - (BOOL)isEventAnExitEvent:(NSEvent*)event {
}
break;
case NSKeyDown: {
bool result = NO;
// Event hooks often see the same keydown event twice due to the way key
// events get dispatched and redispatched, so ignore if this keydown
// event has the EXACT same timestamp as the previous keydown.
static NSTimeInterval lastKeyDownEventTime;
NSTimeInterval thisTime = [event timestamp];
if (lastKeyDownEventTime != thisTime) {
lastKeyDownEventTime = thisTime;
if (folderController_) {
result = [folderController_ handleInputText:[event characters]];
}
if ([event modifierFlags] & NSCommandKeyMask)
return YES;
else if (folderController_)
return [folderController_ handleInputText:[event characters]];
}
return result;
return NO;
}
case NSKeyUp:
return NO;
Expand Down

0 comments on commit dbe9778

Please sign in to comment.