Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5821)

Unified Diff: chrome/browser/tab_contents/tab_contents_view_mac.mm

Issue 272008: Forgot backspace/shift-backspace. (Closed)
Patch Set: align Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/global_keyboard_shortcuts_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_contents_view_mac.mm
diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.mm b/chrome/browser/tab_contents/tab_contents_view_mac.mm
index 52e18b99a321cb690cff40f7c68a6af9f9e1170f..03baffc6fe004848ad63cf3614ab5e4eca084361 100644
--- a/chrome/browser/tab_contents/tab_contents_view_mac.mm
+++ b/chrome/browser/tab_contents/tab_contents_view_mac.mm
@@ -299,12 +299,15 @@ void TabContentsViewMac::Observe(NotificationType type,
if (![self window])
return;
- ChromeBrowserWindow* window = (ChromeBrowserWindow*)[self window];
- DCHECK([window isKindOfClass:[ChromeBrowserWindow class]]);
- if ([window handleExtraBrowserKeyboardShortcut:event])
- return;
- if ([window handleExtraWindowKeyboardShortcut:event])
- return;
+ // Do not fire shortcuts on key up.
+ if ([event type] == NSKeyDown) {
+ ChromeBrowserWindow* window = (ChromeBrowserWindow*)[self window];
+ DCHECK([window isKindOfClass:[ChromeBrowserWindow class]]);
+ if ([window handleExtraBrowserKeyboardShortcut:event])
+ return;
+ if ([window handleExtraWindowKeyboardShortcut:event])
+ return;
+ }
if ([event type] == NSKeyDown)
[super keyDown:event];
« no previous file with comments | « chrome/browser/global_keyboard_shortcuts_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698