Some keyboard shortcuts can fail after switching tabs. b=428405 r=josh sr=roc a=ss
git-svn-id: svn://10.0.0.236/trunk@253721 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
c5b2cf2e21
commit
12e22dd5a5
@ -5388,12 +5388,16 @@ static BOOL keyUpAlreadySentKeyDown = NO;
|
||||
|
||||
nsAutoRetainCocoaObject kungFuDeathGrip(self);
|
||||
|
||||
// if we aren't the first responder, pass the event on
|
||||
// If we're not the first responder and the first responder is an NSView
|
||||
// object, pass the event on. Otherwise (if, for example, the first
|
||||
// responder is an NSWindow object) we should trust the OS to have called
|
||||
// us correctly.
|
||||
id firstResponder = [[self window] firstResponder];
|
||||
if (firstResponder != self) {
|
||||
// Special handling if the other first responder is a ChildView.
|
||||
if ([firstResponder isKindOfClass:[ChildView class]])
|
||||
return [(ChildView *)firstResponder performKeyEquivalent:theEvent];
|
||||
else
|
||||
if ([firstResponder isKindOfClass:[NSView class]])
|
||||
return [super performKeyEquivalent:theEvent];
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user