| Index: chrome/browser/cocoa/chrome_browser_window.mm
|
| diff --git a/chrome/browser/cocoa/chrome_browser_window.mm b/chrome/browser/cocoa/chrome_browser_window.mm
|
| index 6786cda3cd38ab406962399a4bc74ab1bdc46f9b..e9eff6c83124fb42aadf27c1f93abd6236f83ae2 100644
|
| --- a/chrome/browser/cocoa/chrome_browser_window.mm
|
| +++ b/chrome/browser/cocoa/chrome_browser_window.mm
|
| @@ -298,16 +298,12 @@ typedef int (*KeyToCommandMapper)(bool, bool, bool, int);
|
| }
|
|
|
| - (BOOL)performKeyEquivalent:(NSEvent*)event {
|
| - // Give the web site a chance to handle the event. If it doesn't want to
|
| - // handle it, it will call us back with one of the |handle*| methods above.
|
| - NSResponder* r = [self firstResponder];
|
| - if ([r isKindOfClass:[RenderWidgetHostViewCocoa class]])
|
| - return [r performKeyEquivalent:event];
|
| -
|
| // Handle per-window shortcuts like cmd-1, but do not handle browser-level
|
| // shortcuts like cmd-left (else, cmd-left would do history navigation even
|
| - // if e.g. the Omnibox has focus).
|
| - if ([self handleExtraWindowKeyboardShortcut:event])
|
| + // if e.g. the Omnibox has focus). If the web has focus, don't do this here,
|
| + // since the web needs to get a chance at swallowing the event first.
|
| + if (![[self firstResponder] isKindOfClass:[RenderWidgetHostViewCocoa class]]
|
| + && [self handleExtraWindowKeyboardShortcut:event])
|
| return YES;
|
| return [super performKeyEquivalent:event];
|
| }
|
|
|