Skip to content

Document browser-compatible IntersectionObserver margins - #60344

Merged
meta-codesync[bot] merged 1 commit into
react:mainfrom
rubennorte:export-D134834007
Dec 1, 2026
Merged

meta-codesync[bot] merged 1 commit into
react:mainfrom
rubennorte:export-D134834007

Conversation

@rubennorte

Copy link
Copy Markdown
Member

Summary:

Context

The Intersection Observer specification says percentage margins on every edge resolve against width. Chrome, Firefox, and Safari instead resolve vertical rootMargin percentages against height. Chrome and Safari also do so for scrollMargin, matching React Native. Preserve browser compatibility rather than changing existing consumers.

Changes

Document the intentional compatibility divergence in resolveEdgeMargins, linking the specification, Chromium implementation, and https://issues.chromium.org/issues/40725112. No runtime behavior, helper signature, tests, or API snapshots change.

Changelog: [Internal]

Differential Revision: D134834007

Summary:
## Context
The Intersection Observer specification says percentage margins on every edge resolve against width. Chrome, Firefox, and Safari instead resolve vertical rootMargin percentages against height. Chrome and Safari also do so for scrollMargin, matching React Native. Preserve browser compatibility rather than changing existing consumers.

## Changes
Document the intentional compatibility divergence in `resolveEdgeMargins`, linking the specification, Chromium implementation, and https://issues.chromium.org/issues/40725112. No runtime behavior, helper signature, tests, or API snapshots change.

Changelog: [Internal]

Differential Revision: D134834007
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 27, 2026
@meta-codesync

meta-codesync Bot commented Nov 27, 2026

Copy link
Copy Markdown

@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D134834007.

@javache javache left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

@meta-codesync
meta-codesync Bot merged commit e9b0973 into react:main Dec 1, 2026
107 of 113 checks passed
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @rubennorte in e9b0973

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants