mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-28 19:08:50 +00:00
Fixed: after tabbing to a token field it'd immediately lose first responder status.
Without this fix, the tab key press would be propagated to the browser, which would blur the focused input element, even when that input element was the one the new first responder intended to use.
This commit is contained in:
1 parent
788ee6cd90
commit
fd3ad76db3
1 file changed
+20
-2
@@ -1673,11 +1673,29 @@ CPTexturedBackgroundWindowMask
|
||||
[self selectPreviousKeyView:self];
|
||||
else
|
||||
[self selectNextKeyView:self];
|
||||
|
||||
#if PLATFORM(DOM)
|
||||
// Make sure the browser doesn't try to do its own tab handling.
|
||||
// This is important or the browser might blur the shared text field or token field input field,
|
||||
// even that we just moved it to a new first responder.
|
||||
[[[anEvent window] platformWindow] _propagateCurrentDOMEvent:NO]
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
else if ([anEvent charactersIgnoringModifiers] === CPBackTabCharacter)
|
||||
return [self selectPreviousKeyView:self];
|
||||
{
|
||||
var didTabBack = [self selectPreviousKeyView:self];
|
||||
if (didTabBack)
|
||||
{
|
||||
#if PLATFORM(DOM)
|
||||
// Make sure the browser doesn't try to do its own tab handling.
|
||||
// This is important or the browser might blur the shared text field or token field input field,
|
||||
// even that we just moved it to a new first responder.
|
||||
[[[anEvent window] platformWindow] _propagateCurrentDOMEvent:NO]
|
||||
#endif
|
||||
}
|
||||
|
||||
return didTabBack;
|
||||
}
|
||||
|
||||
[[self firstResponder] keyDown:anEvent];
|
||||
|
||||
|
||||
Reference in new issue
Block a user