diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index 9fa4ffd69..01bf60f10 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -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];