Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't copy/paste/select a text from TextInput (Android) #27787

Closed
VTSingle opened this issue Jan 16, 2020 · 1 comment
Closed

Can't copy/paste/select a text from TextInput (Android) #27787

VTSingle opened this issue Jan 16, 2020 · 1 comment
Labels
Component: TextInput Related to the TextInput component. Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@VTSingle
Copy link

Pls help me.
I can't on Android copy/paste/select a text from TextInput.
I have just TextInput without ScrollView or ListView.
But when I changed for Android true to false of the line removeClippedSubviews={ Platform.OS === 'ios' ? !isVisible : true}
from file /node_modules/react-navigation-tabs/src/views/ResourceSavingScene.js it works correct.

Someone can you help me?

@react-native-bot react-native-bot added Component: TextInput Related to the TextInput component. Platform: Android Android applications. labels Jan 16, 2020
@react-native-bot
Copy link
Collaborator

We are automatically closing this issue because it does not appear to follow any of the provided issue templates.

👉 Click here if you want to report a reproducible bug or regression in React Native.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Resolution: No Template labels Jan 16, 2020
facebook-github-bot pushed a commit that referenced this issue Oct 5, 2020
…ts (#28852)

Summary:
This is a resubmit of D21499015. It resolves #28852 and #27787.

From Harry Yu's original PR (too old to merge now):

Text in TextInputs can't be selected by long press. This happens only when they're inside of FlatLists that are rendered with removeClippedSubview prop set to true on Android.

Fixes #27787

Issue #6085 2 years ago had fixed this issue with a quick fix, but the code has since disappeared in another change. It has a longer explanation for why it's fixed, but essentially - the text is assumed to be not selectable since the TextInput is initialized without being attached to the window. We need to explicitly set the text to be selectable on attachment. This change redoes that change with a 1-line fix.

Changelog: [Android] [Fixed] - Fixed TextInput not being selectable in removeClippedSubviews FlatLists

Pull Request resolved: #28852

Test Plan:
This can be tested with a new toggle in RNTesterApp.
Go to the FlatList in RNTesterApp
Toggle on "removeClippedSubviews"
Try selecting some text in the list header. It should fail without this comment but succeed with it

Reviewed By: sammy-SC

Differential Revision: D24043533

Pulled By: JoshuaGross

fbshipit-source-id: c8e60f8131ccc5f6af31ed976c4184d0a16eb3af
@facebook facebook locked as resolved and limited conversation to collaborators Oct 2, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: TextInput Related to the TextInput component. Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants