Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Issue 284823005: Calling focus() on an iframe should not trigger a 'focusout' event (Closed)

Created:
6 years, 7 months ago by Inactive
Modified:
6 years, 6 months ago
Reviewers:
eseidel, Rick Byers, ojan
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, sof, eae+blinkwatch, rwlbuis, Rick Byers, Zeeshan Qureshi
Visibility:
Public.

Description

Calling 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -1 line) Patch
A LayoutTests/fast/frames/frame-focus-no-focusout-event.html View 1 chunk +21 lines, -0 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
Inactive
6 years, 7 months ago (2014-05-13 19:22:25 UTC) #1
Inactive
post BlinkOn ping? :)
6 years, 7 months ago (2014-05-16 13:38:00 UTC) #2
Inactive
Eric, Ojan, is this something you can/want to review? Could you please advise an alternative ...
6 years, 7 months ago (2014-05-20 11:59:44 UTC) #3
eseidel
Does this match behavior of FF/IE, etc? Rick is staring into the depths of focus() ...
6 years, 6 months ago (2014-05-29 00:08:20 UTC) #4
Inactive
On 2014/05/29 00:08:20, eseidel wrote: > Does this match behavior of FF/IE, etc? > > ...
6 years, 6 months ago (2014-05-29 00:39:00 UTC) #5
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 6 months ago (2014-05-29 00:39:12 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/284823005/1
6 years, 6 months ago (2014-05-29 00:39:34 UTC) #7
commit-bot: I haz the power
Change committed as 175017
6 years, 6 months ago (2014-05-29 00:52:44 UTC) #8
Rick Byers
Yep, this sounds like the right change to me - thanks!
6 years, 6 months ago (2014-05-29 02:14:56 UTC) #9
Inactive
6 years, 6 months ago (2014-05-29 12:16:56 UTC) #10
Message was sent while issue was closed.
On 2014/05/29 02:14:56, Rick Byers wrote:
> Yep, this sounds like the right change to me - thanks!

Great, thanks for taking a look Rick.

Powered by Google App Engine
This is Rietveld 408576698