adium-1.4 2723:6fa58273701e: Prevent infinitely forwarding navig...
commits at adium.im
commits at adium.im
Sun Nov 1 16:15:37 UTC 2009
details: http://hg.adium.im/adium-1.4/rev/6fa58273701e
revision: 2723:6fa58273701e
author: Zachary West <zacw at adium.im>
date: Sun Nov 01 11:15:19 2009 -0500
Prevent infinitely forwarding navigation events. Fixes #13251.
diffs (28 lines):
diff -r 79837511a894 -r 6fa58273701e Plugins/WebKit Message View/ESWebView.m
--- a/Plugins/WebKit Message View/ESWebView.m Sat Oct 31 23:36:14 2009 -0400
+++ b/Plugins/WebKit Message View/ESWebView.m Sun Nov 01 11:15:19 2009 -0500
@@ -93,9 +93,22 @@
//into this view.
- (void)keyDown:(NSEvent *)theEvent
{
+ BOOL forwarded = YES;
+
if (shouldForwardEvents) {
- [self forwardSelector:@selector(keyDown:) withObject:theEvent];
- } else {
+ unichar inChar = [[theEvent charactersIgnoringModifiers] characterAtIndex:0];
+
+ // Don't forward navigation key events. If we're receiving them, it's because
+ // the frame itself didn't support them.
+ if (inChar != NSUpArrowFunctionKey && inChar != NSDownArrowFunctionKey &&
+ inChar != NSPageUpFunctionKey && inChar != NSPageDownFunctionKey)
+ {
+ [self forwardSelector:@selector(keyDown:) withObject:theEvent];
+ forwarded = YES;
+ }
+ }
+
+ if (!forwarded) {
[super keyDown:theEvent];
}
}
More information about the commits
mailing list