Skip to content

[pull] main from facebook:main#506

Merged
pull[bot] merged 2 commits intocode:mainfrom
facebook:main
Mar 13, 2026
Merged

[pull] main from facebook:main#506
pull[bot] merged 2 commits intocode:mainfrom
facebook:main

Conversation

@pull
Copy link

@pull pull bot commented Mar 13, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

hoxyq and others added 2 commits March 12, 2026 14:19
The potential paddings and margins for the empty block are already
handled via CSS selectors.
I found two focus bugs when working on documentation for Fragment Refs.

1) If an element delegates focus handling, it will return false from
setFocusIfFocusable even though a focus event has occured on a different
element. The fix for this is a document level event listener rather than
only listening on the current element.

For example, if you have a form with multiple nested label>inputs.
Calling focus on the label will focus its input but not fire an event on
the label. setFocusIfFocusable returns false and you end up continuing
to attempt focus down the form tree.

2) If an element is already focused, setFocusIfFocusable will return
false. The fix for this is checking the document's activeElement with an
early return.

In the same form example, if the first input is already focused and you
call fragmentInstance.focus() at the form level, the second input would
end up getting focused since the focus event on the first is not
triggered.
@pull pull bot locked and limited conversation to collaborators Mar 13, 2026
@pull pull bot added the ⤵️ pull label Mar 13, 2026
@pull pull bot merged commit c80a075 into code:main Mar 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants