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

@jackpope jackpope 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

@meta-cla meta-cla Bot added the CLA Signed label Jul 31, 2026
@jackpope
jackpope force-pushed the fragment-refs/empty-fragment-host-siblings branch 2 times, most recently from 0290447 to ff50c0f Compare July 31, 2026 19:14
@github-actions github-actions Bot added the React Core Team Opened by a member of the React Core Team label Jul 31, 2026
@jackpope
jackpope force-pushed the fragment-refs/empty-fragment-host-siblings branch from ff50c0f to 68a6ce0 Compare July 31, 2026 20:15
@jackpope
jackpope requested a review from eps1lon July 31, 2026 21:08
@jackpope
jackpope marked this pull request as ready for review July 31, 2026 21:08
@jackpope
jackpope force-pushed the fragment-refs/empty-fragment-host-siblings branch from 68a6ce0 to f535428 Compare August 9, 2026 19:15
@jackpope
jackpope force-pushed the fragment-refs/empty-fragment-host-siblings branch from f535428 to 169969c Compare August 11, 2026 03:49
@jackpope
jackpope force-pushed the fragment-refs/empty-fragment-host-siblings branch from 169969c to f0f3f22 Compare August 12, 2026 00:50
Base automatically changed from fragment-refs/blur-portaled-focus to main August 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
jackpope force-pushed the fragment-refs/empty-fragment-host-siblings branch from f0f3f22 to 8459200 Compare August 12, 2026 01:05

@poteto poteto 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 +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 7.35 kB 7.35 kB +0.05% 1.96 kB 1.96 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 619.87 kB 619.81 kB = 109.64 kB 109.58 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 7.36 kB 7.36 kB +0.05% 1.96 kB 1.97 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 691.08 kB 691.02 kB = 121.14 kB 121.08 kB
facebook-www/ReactDOM-prod.classic.js = 711.28 kB 711.22 kB = 124.57 kB 124.51 kB
facebook-www/ReactDOM-prod.modern.js = 701.59 kB 701.53 kB = 122.99 kB 122.93 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-reconciler/cjs/react-reconciler-reflection.development.js = 13.53 kB 13.41 kB = 2.78 kB 2.73 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-reflection.development.js = 13.53 kB 13.41 kB = 2.78 kB 2.73 kB
oss-stable/react-reconciler/cjs/react-reconciler-reflection.development.js = 13.53 kB 13.41 kB = 2.78 kB 2.73 kB
oss-experimental/react-reconciler/cjs/react-reconciler-reflection.production.js = 11.91 kB 11.79 kB = 2.73 kB 2.69 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-reflection.production.js = 11.91 kB 11.79 kB = 2.73 kB 2.69 kB
oss-stable/react-reconciler/cjs/react-reconciler-reflection.production.js = 11.91 kB 11.79 kB = 2.73 kB 2.69 kB

Generated by 🚫 dangerJS against 8459200

@jackpope
jackpope merged commit db4ee65 into main Aug 12, 2026
238 checks passed
github-actions Bot 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-actions Bot 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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants