fix: avoid SSR marker span in scroll handler, use client-only DOM walking
Replace the marker <span> element in InnerScrollHandlerNew with a
findElementInFragment() helper that uses getClientRects() and
elementFromPoint() to locate a real DOM element within the fragment.
The marker span was causing CI failures under the experimental
__NEXT_EXPERIMENTAL_APP_NEW_SCROLL_HANDLER flag:
- hydration-error-count: extra span changed component tree snapshots
- css-modules-rsc-postcss: querySelector('span') matched the marker
before the test fixture's styled span
Since FragmentInstance doesn't expose parentElement or child references,
we use getClientRects() to find where the fragment's children are
rendered, then elementFromPoint() to resolve a real Element we can walk
up from for sticky/fixed container detection.
Showing
Please
register
or
sign in
to comment