Skip to content

Remove hasTVPreferredFocus - #58700

Open
Abbondanzo wants to merge 2 commits into
react:mainfrom
Abbondanzo:export-D122080657
Open

Abbondanzo wants to merge 2 commits into
react:mainfrom
Abbondanzo:export-D122080657

Conversation

@Abbondanzo

Copy link
Copy Markdown
Contributor

Summary:
Remove the deprecated hasTVPreferredFocus prop from the core View, Button, and Touchable APIs and from Android native prop registration and Fabric. Persistent focus eligibility remains available through focusable, while imperative focus requests are available through focus().

Keep a deprecated no-op ReactViewManager.setTVPreferredFocus method solely for binary compatibility with independently compiled ViewManager subclasses; it no longer registers a React prop or changes focus.

Changelog:
[General][Removed] - Remove the deprecated hasTVPreferredFocus prop

Differential Revision: D122080657

…ct#58657)

Summary:

Programmatic list scrolling can move to an edge before asynchronously scheduled cells finish rendering. The scroll handler then skips the edge callback because the terminal cell is not yet in the render window, and no later scroll or layout event is guaranteed.

Recheck edge callbacks after post-scroll render updates. Track the item count when an edge callback is sent so internal measurement changes cannot emit duplicates while the list remains at the same edge; appending data or scrolling away re-arms the callback.

Changelog:
[General][Fixed] - Fire `VirtualizedList` edge callbacks after programmatic scrolling

Differential Revision: D100870075
Summary:
Remove the deprecated `hasTVPreferredFocus` prop from the core `View`, `Button`, and Touchable APIs and from Android native prop registration and Fabric. Persistent focus eligibility remains available through `focusable`, while imperative focus requests are available through `focus()`.

Keep a deprecated no-op `ReactViewManager.setTVPreferredFocus` method solely for binary compatibility with independently compiled `ViewManager` subclasses; it no longer registers a React prop or changes focus.

Changelog:
[General][Removed] - Remove the deprecated `hasTVPreferredFocus` prop

Differential Revision: D122080657
@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 Sep 28, 2026
@meta-codesync

meta-codesync Bot commented Sep 28, 2026

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

Warning

JavaScript API change detected

This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API.

  • Please include a clear changelog message.
  • This change will be subject to additional review.

This change was flagged as: POTENTIALLY_BREAKING

This branch has not been deployed

No deployments
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. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant