Skip to content

Minor DOM FragmentInstance refactors#433

Closed
everettbu wants to merge 4 commits into
mainfrom
fr-todos
Closed

Minor DOM FragmentInstance refactors#433
everettbu wants to merge 4 commits into
mainfrom
fr-todos

Conversation

@everettbu

@everettbu everettbu commented Jan 27, 2026

Copy link
Copy Markdown

Mirror of facebook/react#35641
Original author: jackpope


Handles TODOs, small follow up refactors

@greptile-apps

greptile-apps Bot commented Jan 27, 2026

Copy link
Copy Markdown

Greptile Overview

Greptile Summary

This PR does small cleanup/refactor work in ReactFiberConfigDOM.js around FragmentInstance DOM APIs:

  • indexOfEventListener now early-returns on empty arrays and caches normalized listener options to avoid recomputing during the loop.
  • FragmentInstance.blur() now computes activeElement once, bails out early if it’s not within the fragment’s parent host instance, and passes activeElement into the traversal callback.
  • Minor variable renames in compareDocumentPosition (element → node) for clarity.

I did not find any merge-blocking issues introduced by these changes.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk.
  • Changes are localized refactors that preserve existing behavior (option normalization caching, early exit in blur traversal, and variable renames) and do not affect external interfaces.
  • No files require special attention

Important Files Changed

Filename Overview
packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js Small refactors in FragmentInstance helpers: cache normalized event listener options, optimize blur() traversal by passing activeElement, and rename compareDocumentPosition locals; no functional issues found.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@everettbu

Copy link
Copy Markdown
Author

Upstream PR was closed or merged. Code is synced via branch mirror.

@everettbu everettbu closed this Feb 11, 2026
@everettbu everettbu deleted the fr-todos branch February 11, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants