You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whilst typing very fast, we've observed that the cursor can lag behind where you are typing, which means that characters get inserted in the middle of the word. We believe that we've narrowed it down to something with the autocorrect/predictive text messing up the cursor position. This only happens to fully controlled inputs - specifically if passing it the value prop. If value is not passed, it seems to be unaffected.
Going into Settings > General > Keyboard and turning off both "Auto-Correction" and "Show Predictions Inline" resolves the issue entirely, leading us to believe it's something to do with the iOS 17 inline predictive text. However, we've found that disabling autocorrect via the autoCorrect prop does not consistently fix the issue, although it improves it ever so slightly.
We've observed this in production on iOS, but is a lot easier to replicate on the iOS simulator (presumably since it's slower).
Steps to reproduce
Install the app on the iOS simulator
Type as fast as you possibly can into both text inputs
Observe the top text input's cursor is not at the end of the text, and the bottom text input's cursor is at the end of the text
Go to Settings > General > Keyboard and turn off both "Auto-Correction" and "Show Predictions Inline" and repeat - both inputs should now behave properly with the cursor at the end of the text
Note that the spam typing does not have a 100% success rate, so you might have to try a couple of times
Description
Whilst typing very fast, we've observed that the cursor can lag behind where you are typing, which means that characters get inserted in the middle of the word. We believe that we've narrowed it down to something with the autocorrect/predictive text messing up the cursor position. This only happens to fully controlled inputs - specifically if passing it the
valueprop. Ifvalueis not passed, it seems to be unaffected.Going into Settings > General > Keyboard and turning off both "Auto-Correction" and "Show Predictions Inline" resolves the issue entirely, leading us to believe it's something to do with the iOS 17 inline predictive text. However, we've found that disabling autocorrect via the
autoCorrectprop does not consistently fix the issue, although it improves it ever so slightly.We've observed this in production on iOS, but is a lot easier to replicate on the iOS simulator (presumably since it's slower).
Steps to reproduce
Note that the spam typing does not have a 100% success rate, so you might have to try a couple of times
React Native Version
0.75.4
Affected Platforms
Runtime - iOS
Output of
npx react-native infoStacktrace or Logs
Reproducer
https://github.com/mozzius/laggy-textinput-repro
Screenshots and Videos
Simulator.Screen.Recording.-.iPhone.15.-.2024-04-19.at.01.55.32.mp4