Repository navigation
script: Fire focusin/focusout - #46980
Merged
Merged
Conversation
Contributor
Author
|
10 new passing subtests; 4 new failling subtests. New failling subtests:
|
RichardTjokroutomo
marked this pull request as draft
August 4, 2026 09:59
Signed-off-by: Richard Tjokroutomo <richard.tjokro2@gmail.com>
Signed-off-by: Richard Tjokroutomo <richard.tjokro2@gmail.com>
RichardTjokroutomo
force-pushed
the
focusin-out
branch
from
August 5, 2026 06:22
6ccd9cf to
e132a9e
Compare
RichardTjokroutomo
marked this pull request as ready for review
August 5, 2026 06:25
yezhizhen
self-requested a review
August 5, 2026 09:16
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
yezhizhen
approved these changes
Aug 5, 2026
Member
There was a problem hiding this comment.
I have
- refactored comment. Earlier it was too verbose, and casing is wrong. It should be lower case instead of "FocusOut" etc.
- updated pr description. It used to say "only the case where all DOM nodes belong to the same document are considered,". But your code do fire focusout/focusin unconditionally.
- updated wpt.
yezhizhen
enabled auto-merge
August 5, 2026 09:57
yezhizhen
disabled auto-merge
August 5, 2026 09:58
focusin/focusoutfocusin/focusout
yezhizhen
enabled auto-merge
August 5, 2026 10:00
RichardTjokroutomo
added a commit
to RichardTjokroutomo/servo
that referenced
this pull request
Oct 6, 2026
Add basic support for `focusin`/`focusout` `FocusEvent` type. The code fires focusin/focusout **unconditionally** alongside focus/blur. Same-document scenarios work correctly, but cross-document cases (e.g. across iframes) have known gaps because FocusEvent's impl is not complete yet: https://github.com/servo/servo/blob/49fa5106cac95620e985ede1c0ddf744709e6c62/components/script/dom/document/focus.rs#L273. Cross-document support will be addressed in a follow-up (subtask 2 of servo#46979). Also fix a minor issue, to set composed flag for https://html.spec.whatwg.org/multipage/interaction.html#fire-a-focus-event Testing: Existing WPT tests. There are some new passing & failling tests. For detail, see servo#46980 (comment) Fixes: part of servo#46979 --------- Signed-off-by: Richard Tjokroutomo <richard.tjokro2@gmail.com> Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> Co-authored-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add basic support for
focusin/focusoutFocusEventtype.The code fires focusin/focusout unconditionally alongside focus/blur. Same-document scenarios work correctly, but cross-document cases (e.g. across iframes) have known gaps because FocusEvent's impl is not complete yet:
servo/components/script/dom/document/focus.rs
Line 273 in 49fa510
Also fix a minor issue, to set composed flag for https://html.spec.whatwg.org/multipage/interaction.html#fire-a-focus-event
Testing: Existing WPT tests. There are some new passing & failling tests. For detail, see #46980 (comment)
Fixes: part of #46979