Skip to content

Drop boolean support for ScrollView keyboardShouldPersistTaps#57386

Open
zoontek wants to merge 2 commits into
react:mainfrom
zoontek:remove-scrollview-keyboard-should-persist-taps-bool
Open

Drop boolean support for ScrollView keyboardShouldPersistTaps#57386
zoontek wants to merge 2 commits into
react:mainfrom
zoontek:remove-scrollview-keyboard-should-persist-taps-bool

Conversation

@zoontek

@zoontek zoontek commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary:

Removes support for the deprecated boolean values of ScrollView's keyboardShouldPersistTaps prop. true/false have long been deprecated in favor of the string values 'always'/'never' (with 'handled' as a third option), and a runtime warning was already emitted when a boolean was passed. This drops the boolean from the type and removes the now-unused boolean handling.

Migration:

  • keyboardShouldPersistTaps={true}keyboardShouldPersistTaps="always"
  • keyboardShouldPersistTaps={false}keyboardShouldPersistTaps="never"

See #57384

Changelog:

[GENERAL] [BREAKING] - Remove deprecated boolean values support for ScrollView keyboardShouldPersistTaps

Test Plan:

  • yarn flow passes (the previously-needed $FlowFixMe[sketchy-null-bool] suppressions are gone).
  • yarn build-types regenerates ReactNativeApi.d.ts with keyboardShouldPersistTaps?: "always" | "handled" | "never".
  • RNTester ScrollView "Keyboard" example still toggles between never/always/handled.

@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 Jun 30, 2026
@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

@zoontek zoontek mentioned this pull request Jun 30, 2026
8 tasks
# Conflicts:
#	packages/react-native/Libraries/Components/ScrollView/ScrollView.js
@zoontek zoontek force-pushed the remove-scrollview-keyboard-should-persist-taps-bool branch from e4e658f to e27ef15 Compare June 30, 2026 16:02
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jun 30, 2026
@meta-codesync

meta-codesync Bot commented Jun 30, 2026

Copy link
Copy Markdown

@Abbondanzo has imported this pull request. If you are a Meta employee, you can view this in D110218873.

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. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant