Fixed: CPDatePicker takes key code CPReturnKeyCode all the time

Previously, the CPDatePicker took the key code CPReturnKeyCode all the time. It means, the key event wasn't redistributed to the other component, for example a defaultButton in a window.

Now instead of returning YES, it returns [super performKeyEquivalent:anEvent]
This commit is contained in:
Alexandre Wilhelm committed 2014-12-09 17:26:02 -08:00
1 parent b2557c38dd
commit 9174338140
1 file changed
+3 -2
+3 -2
View File
@@ -338,10 +338,11 @@ var CPZeroKeyCode = 48,
if ([anEvent keyCode] == CPReturnKeyCode)
{
[_currentTextField _endEditing];
return YES;
return [super performKeyEquivalent:anEvent];
}
return NO;
return [super performKeyEquivalent:anEvent];
}
/*! KeyDown event