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

onSelectionChange and onChangeText queues differently in android and ios #28752

Closed
abdulrahman18 opened this issue Apr 25, 2020 · 10 comments
Closed
Labels
Component: TextInput Related to the TextInput component. Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: Android Android applications. Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@abdulrahman18
Copy link

abdulrahman18 commented Apr 25, 2020

Description

When the input changes, the onChangeText triggers first in Android and onSelectionChanges triggers next. But in iPhone its vice verse.

React Native version:

react-native-cli: 2.0.1
react-native: n/a - not inside a React Native project directory (expo - sdk 57)

Steps To Reproduce

Add onSelectionChange and onCHangeText for a TextInput,
Change and see the log

Expected Results

Its should be consistent for both anyone in either way
I need the selection start and end to string manipulate for tag mentions. Due to this bug, we couldn't make the string logics based on the text input and caret selection.

Note: All the versions are latest up to yesterday.

@abdulrahman18
Copy link
Author

@JoshuaGross or anyone from the space can help me!

@react-native-bot react-native-bot added Platform: Android Android applications. Platform: iOS iOS applications. labels Apr 25, 2020
@cruzach
Copy link

cruzach commented Apr 29, 2020

Expo SDK 37 relies on react native .61

Can you try this in a bare react native project using the latest version and see if you can reproduce the issue?

@cruzach cruzach added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. and removed Needs: Triage 🔍 labels Apr 29, 2020
@github-actions
Copy link

⚠️ Missing Reproducible Example
ℹ️ It looks like your issue is missing a reproducible example. Please provide a Snack or a repository that demonstrates the issue you are reporting in a minimal, complete, and reproducible manner.

@abdulrahman18
Copy link
Author

@cruzach I updated my code expo to bare workflow
latest version - "react-native": "~0.62.2"

But still, the issue happened in android

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels May 4, 2020
@chrisglein chrisglein added Component: TextInput Related to the TextInput component. Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. and removed Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Needs: Attention Issues where the author has responded to feedback. labels May 13, 2020
@github-actions
Copy link

⚠️ Missing Environment Information
ℹ️ Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console.

@github-actions
Copy link

⚠️ Missing Reproducible Example
ℹ️ It looks like your issue is missing a reproducible example. Please provide a Snack or a repository that demonstrates the issue you are reporting in a minimal, complete, and reproducible manner.

@chrisglein
Copy link

Sounds like you have a standalone repro but I'm not seeing a link?

@react-native-bot react-native-bot removed the Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. label May 13, 2020
@stale
Copy link

stale bot commented Aug 16, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 16, 2020
@stale
Copy link

stale bot commented Aug 23, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 23, 2020
@vomchik
Copy link

vomchik commented Oct 14, 2020

related to #28865

@facebook facebook locked as resolved and limited conversation to collaborators Oct 1, 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. Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: Android Android applications. Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

5 participants