Repository navigation
Remove the native EventTarget event-dispatch flag (#59896) - #59896
Merged
Merged
Conversation
|
@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D130671804. |
Summary: Remove `enableNativeEventTargetEventDispatching` and retain its enabled paths unconditionally. Preserve the separate `enableImperativeEvents` gate and existing test behavior. Test edits remove retired flag configuration and correct the typing required by the ungated `EventTarget` inheritance; no assertions or helper functions were added. Regenerate the public API snapshot for the permanent `EventTarget` inheritance. Changelog: [Internal] Reviewed By: zeyap Differential Revision: D130671804
rubennorte
force-pushed
the
export-D130671804
branch
from
November 10, 2026 11:40
4c761a8 to
6e0f8f1
Compare
|
Warning JavaScript API change detected This PR commits an update to
This change was flagged as: |
Collaborator
|
This pull request was successfully merged by @rubennorte in 9f40f16 When will my fix make it into a release? | How to file a pick request? |
This was referenced Nov 10, 2026
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Nov 10, 2026
Summary: react#59896 made `ReactNativeElement` unconditionally extend `EventTarget`, which imports the `AbortSignal` type, pulling `AbortSignal.d.ts` into the generated types checked by `yarn test-generated-typescript`. The internal `abortSignal(reason = ..., signal)` helper declares a defaulted parameter before a required one, which flow-api-translator emits as `abortSignal(reason?: unknown | void, signal: AbortSignal)` and tsc rejects with TS1016. Reorder the parameters to `abortSignal(signal, reason = ...)` and update both internal callers. The public API snapshot is unchanged. Changelog: [Internal] Test Plan: - `yarn build-types --skip-snapshot && yarn test-generated-typescript`: fails with TS1016 before, passes after - `yarn build-types --validate`: API snapshot is up to date - `yarn eslint --max-warnings 0 packages/react-native/src/private/webapis/dom/abort-api/`
This was referenced Nov 10, 2026
rubennorte
added a commit
that referenced
this pull request
Nov 10, 2026
…59911) * Force native EventTarget event dispatching on for the React renderer ## Summary: #59896 removed `enableNativeEventTargetEventDispatching` from `ReactNativeFeatureFlags`, but the vendored Fabric renderer still reads it through `react-native/react-private-interface` to choose between `dispatchNativeEvent` and the legacy plugin-based dispatch. With the getter gone, the renderer saw `undefined`, treated the flag as off, and fell back to the legacy path, so listeners registered with `addEventListener` were never called. The `ReactNativeFeatureFlags` getter in the private interface now returns the real flags plus `enableNativeEventTargetEventDispatching: () => true`, so only the renderer sees it. This can be removed once the renderer is synced from a React build that no longer reads the flag. ## Changelog: [Internal] ## Test Plan: - `yarn fantom packages/react-native/src/private/renderer/core/__tests__/EventTargetDispatching-itest.js`: 16 failures before, 78 passed / 20 skipped after. - `yarn fantom packages/react-native/src/private/webapis/dom packages/react-native/src/private/renderer`: 513 passed, 26 skipped. - `yarn eslint --max-warnings 0` and `yarn prettier --check` on both changed files pass. - `yarn flow-check` reports only 2 unrelated parse errors from local git ref logs under `.git/logs/refs/remotes/` whose names end in `.json`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) * Fix build_js_types: move abortSignal's required param first Summary: #59896 made `ReactNativeElement` unconditionally extend `EventTarget`, which imports the `AbortSignal` type, pulling `AbortSignal.d.ts` into the generated types checked by `yarn test-generated-typescript`. The internal `abortSignal(reason = ..., signal)` helper declares a defaulted parameter before a required one, which flow-api-translator emits as `abortSignal(reason?: unknown | void, signal: AbortSignal)` and tsc rejects with TS1016. Reorder the parameters to `abortSignal(signal, reason = ...)` and update both internal callers. The public API snapshot is unchanged. Changelog: [Internal] Test Plan: - `yarn build-types --skip-snapshot && yarn test-generated-typescript`: fails with TS1016 before, passes after - `yarn build-types --validate`: API snapshot is up to date - `yarn eslint --max-warnings 0 packages/react-native/src/private/webapis/dom/abort-api/` * Update LogBoxInspector snapshots for the safe area insets listener ## Summary: #59797 added `experimental_onSafeAreaInsetsChange` to the root `logbox_inspector` view, and #59893 refreshed the LogBox snapshots without that change, so both landed but the committed `LogBoxInspector` baseline is missing the prop. The two inspector snapshot tests fail in Fantom CI mode, which no longer rewrites mismatched baselines (#59895). Regenerate the two affected snapshots; the only change is the added prop on the root view. ## Changelog: [Internal] ## Test Plan: - `CI=true yarn fantom packages/react-native/Libraries/LogBox`: 2 snapshot failures before; 90/90 tests and 54/54 snapshots pass after, on two consecutive runs. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Remove
enableNativeEventTargetEventDispatchingand retain its enabled paths unconditionally. Preserve the separateenableImperativeEventsgate and existing test behavior. Test edits remove retired flag configuration and correct the typing required by the ungatedEventTargetinheritance; no assertions or helper functions were added. Regenerate the public API snapshot for the permanentEventTargetinheritance.Changelog: [Internal]
Reviewed By: zeyap
Differential Revision: D130671804