DescriptionCalling focus() on an iframe should not trigger a 'focusout' event
Update Element::updateFocusAppearance() so that calling focus() on an iframe
no longer triggers a 'focusout' event. The issue was that Element:focus() would
call focusController().setFocusedElement() to set focus to the given element
and then call updateFocusAppearance() which would potentially steal the focus
and give it to another Element. This is because updateFocusAppearance() calls
FrameSelection::setSelection() which set focus unless explicitely told
otherwise using the DoNotSetFocus option.
This CL updates updateFocusAppearance() to pass DoNotSetFocus option when
calling FrameSelection::setSelection() to maintain the focused Element
previously set by Element::focus().
The new behavior is in line with Firefox 29 and IE11.
R=eseidel@chromium.org, ojan@chromium.org
TEST=fast/frames/frame-focus-no-focusout-event.html
BUG=372777
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175017
Patch Set 1 #
Messages
Total messages: 10 (0 generated)
|