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

Textinput onChange/onChangeText are not triggered on Android if the underlying text does not change #18822

Closed
Jyrno42 opened this issue Apr 12, 2018 · 10 comments
Labels
Bug Component: TextInput Related to the TextInput component. Platform: Android Android applications. Platform: Linux Building on Linux. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@Jyrno42
Copy link
Contributor

Jyrno42 commented Apr 12, 2018

On android onChange/onChangeText are not triggered if the underlying text does not change. On IOS however the callbacks are always called.

Environment

Environment:
OS: Linux 4.13
Node: 8.9.4
Yarn: 1.3.2
npm: 5.6.0
Watchman: Not Found
Xcode: N/A
Android Studio: Not Found

Packages: (wanted => installed)
react: ^16.3.1 => 16.3.1
react-native: latest => 0.55.2

Steps to Reproduce

Repro here: https://snack.expo.io/@jyrno42/textinput-onchange-onchangetext-issue

Test it by:

  • Enter 1 into both inputs

Expected Behavior

  • Observe the eventLog, it should contain 2 items:
    • onChange: 1
    • onChangeText: 1

Actual Behavior

  • On android the events are not triggered
@Jyrno42 Jyrno42 changed the title Text onChange/onChangeText are not triggered if the underlying text does not change. On IOS however the callbacks are always called. Textinput onChange/onChangeText are not triggered if the underlying text does not change Apr 12, 2018
@react-native-bot
Copy link
Collaborator

Thanks for posting this! It looks like your issue may be missing some necessary information. Can you run react-native info and edit your issue to include these results under the Environment section?

Thank you for your contributions.

@react-native-bot react-native-bot added ❔Needs More Information Component: TextInput Related to the TextInput component. Platform: Linux Building on Linux. labels Apr 12, 2018
@Jyrno42
Copy link
Contributor Author

Jyrno42 commented Apr 12, 2018

Added missing env @react-native-bot

@Jyrno42 Jyrno42 changed the title Textinput onChange/onChangeText are not triggered if the underlying text does not change Textinput onChange/onChangeText are not triggered on Android if the underlying text does not change Apr 12, 2018
@react-native-bot react-native-bot added the Platform: Android Android applications. label Apr 12, 2018
@egemon
Copy link

egemon commented Jul 24, 2018

@react-native-bot status? Do we need to make some noise asking to fix this?

@lunatolun
Copy link

We can reproduce this on multiple android devices. RN v0.56.0

@acrosson
Copy link

@Jyrno42 Any solution? I'm experience this

@lunatolun
Copy link

From what I see, setting autocorrect false fixes this. Otherwise, it sets the text input empty, you can see empty, but still appends the last word of the text when you start typing.
Also, the issue does not happen if the text ends with a space or punctuation, for some weird reason.

autoCorrect={Platform.OS === 'ios' ? true : false}

@stale
Copy link

stale bot commented Dec 21, 2018

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 "For Discussion" or "Good first issue" 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 Dec 21, 2018
@Jyrno42
Copy link
Contributor Author

Jyrno42 commented Dec 21, 2018

not stale.

E: I have some time to work on react-native today so I'll look into it.
E2: Gave up since I wasn't able to write a Testcase for this without espresso and I could not figure out how to add espresso.

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Dec 21, 2018
@hramos hramos removed the Bug Report label Feb 6, 2019
@stale
Copy link

stale bot commented Aug 2, 2019

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 2, 2019
@stale
Copy link

stale bot commented Aug 9, 2019

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 9, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: TextInput Related to the TextInput component. Platform: Android Android applications. Platform: Linux Building on Linux. 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

6 participants