Skip to content

fix(android): show soft keyboard on text selection#57477

Open
nikhilpakhloo wants to merge 2 commits into
react:mainfrom
nikhilpakhloo:fix/android-textinput-long-press-soft-keyboard
Open

fix(android): show soft keyboard on text selection#57477
nikhilpakhloo wants to merge 2 commits into
react:mainfrom
nikhilpakhloo:fix/android-textinput-long-press-soft-keyboard

Conversation

@nikhilpakhloo

@nikhilpakhloo nikhilpakhloo commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

This change fixes an Android TextInput issue where long-pressing text to start selection could leave the soft keyboard hidden. The native view now requests the IME when selection changes from a collapsed cursor to a non-collapsed selection while the input is focused, matching the expected editable-text behavior.

Changelog

[Android] [Fixed] - Show the soft keyboard when long-press starts text selection in TextInput.

Test Plan

  • Added a regression unit test covering the selection-to-keyboard behavior in packages/react-native/ReactAndroid/src/test/java/com/facebook/react/views/textinput/ReactTextInputPropertyTest.kt.
  • Verified the modified Kotlin files report no editor errors.
  • Attempted to run:
./gradlew :packages:react-native:ReactAndroid:testDebugUnitTest --tests com.facebook.react.views.textinput.ReactTextInputPropertyTest

@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 Jul 8, 2026
@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 Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Caution

Missing Changelog

Please add a Changelog to your PR description. See Changelog format

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. 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