Skip to content

[DOM] Find host siblings for nested empty Fragments - #37162

Merged
jackpope merged 1 commit into
mainfrom
fragment-refs/empty-fragment-host-siblings
Aug 12, 2026
Merged

[DOM] Find host siblings for nested empty Fragments#37162
jackpope merged 1 commit into
mainfrom
fragment-refs/empty-fragment-host-siblings

Conversation

@jackpope

@jackpopejackpope commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Fixes a bug where compareDocumentPosition fiber traversal would stop searching after an empty Fragment fiber. Also affects scrollIntoView

@jackpope
jackpopeforce-pushed the fragment-refs/empty-fragment-host-siblings branch 2 times, most recently from 0290447 to ff50c0fCompareJuly 31, 2026 19:14
@github-actionsgithub-actionsBot added the React Core Team Opened by a member of the React Core Team label Jul 31, 2026
@jackpope
jackpopeforce-pushed the fragment-refs/empty-fragment-host-siblings branch from ff50c0f to 68a6ce0CompareJuly 31, 2026 20:15
@jackpope
jackpope requested a review from eps1lonJuly 31, 2026 21:08
@jackpope
jackpope marked this pull request as ready for review July 31, 2026 21:08
@jackpope
jackpopeforce-pushed the fragment-refs/empty-fragment-host-siblings branch from 68a6ce0 to f535428CompareAugust 9, 2026 19:15
@jackpope
jackpopeforce-pushed the fragment-refs/empty-fragment-host-siblings branch from f535428 to 169969cCompareAugust 11, 2026 03:49
@jackpope
jackpopeforce-pushed the fragment-refs/empty-fragment-host-siblings branch from 169969c to f0f3f22CompareAugust 12, 2026 00:50
Base automatically changed from fragment-refs/blur-portaled-focus to mainAugust 12, 2026 01:05
Empty compareDocumentPosition used fiber.sibling, and the shared host
sibling walk stopped too early inside non-host wrappers. Use the parent
tree walk and keep scanning after nested empties so CDP and
scrollIntoView resolve following siblings.
@jackpope
jackpopeforce-pushed the fragment-refs/empty-fragment-host-siblings branch from f0f3f22 to 8459200CompareAugust 12, 2026 01:05

@potetopoteto left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (light skim). Stacking stamps for the fragment-refs land sequence.

@react-sizebot

Copy link
Copy Markdown

Comparing: 278d318...8459200

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name+/-BaseCurrent+/- gzipBase gzipCurrent gzip
oss-stable/react-dom/cjs/react-dom.production.js=7.35 kB7.35 kB+0.05%1.96 kB1.96 kB
oss-stable/react-dom/cjs/react-dom-client.production.js=619.87 kB619.81 kB=109.64 kB109.58 kB
oss-experimental/react-dom/cjs/react-dom.production.js=7.36 kB7.36 kB+0.05%1.96 kB1.97 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js=691.08 kB691.02 kB=121.14 kB121.08 kB
facebook-www/ReactDOM-prod.classic.js=711.28 kB711.22 kB=124.57 kB124.51 kB
facebook-www/ReactDOM-prod.modern.js=701.59 kB701.53 kB=122.99 kB122.93 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name+/-BaseCurrent+/- gzipBase gzipCurrent gzip
oss-experimental/react-reconciler/cjs/react-reconciler-reflection.development.js=13.53 kB13.41 kB=2.78 kB2.73 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-reflection.development.js=13.53 kB13.41 kB=2.78 kB2.73 kB
oss-stable/react-reconciler/cjs/react-reconciler-reflection.development.js=13.53 kB13.41 kB=2.78 kB2.73 kB
oss-experimental/react-reconciler/cjs/react-reconciler-reflection.production.js=11.91 kB11.79 kB=2.73 kB2.69 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-reflection.production.js=11.91 kB11.79 kB=2.73 kB2.69 kB
oss-stable/react-reconciler/cjs/react-reconciler-reflection.production.js=11.91 kB11.79 kB=2.73 kB2.69 kB

Generated by 🚫 dangerJS against 8459200

@jackpope
jackpope merged commit db4ee65 into mainAug 12, 2026
238 checks passed
github-actionsBot pushed a commit that referenced this pull request Aug 12, 2026
Fixes a bug where `compareDocumentPosition` fiber traversal would stop
searching after an empty Fragment fiber. Also affects `scrollIntoView`
DiffTrain build for [db4ee65](db4ee65)
github-actionsBot pushed a commit that referenced this pull request Aug 12, 2026
Fixes a bug where `compareDocumentPosition` fiber traversal would stop
searching after an empty Fragment fiber. Also affects `scrollIntoView`
DiffTrain build for [db4ee65](db4ee65)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedReact Core TeamOpened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@jackpope@react-sizebot@poteto@eps1lon