SIGN IN SIGN UP

[DOM] Handle scrolling of empty Fragments below containers (#37061)

e.g. `render(<Fragment ref={...}>{children}</Fragment>)` where
`children` contain no Host Components.

For `Document` we just noop because some part of the document is always
in view.
For `ShadowRoot` we use its `host`.
Any other `DocumentFragment` without a `host` issues a warning because
there's nothing to scroll. This matches the existing warning when you
call `scrollIntoView(false)` on an empty Fragment without siblings.

Notably this also applies to `<html><body /></html>` in `children`
because we skip `HostSingleton` at the moment.

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
S
Sebastian "Sebbie" Silbermann committed
fa5212c188a1598cbc3a29b9abd753c83373a565
Parent: 8384090
Committed by GitHub <noreply@github.com> on 7/20/2026, 8:40:57 PM