Autocomplete Failure in React Native TextInput with multiline={true} Prop (TextInput) #44036
Labels
Component: TextInput
Related to the TextInput component.
Issue: Author Provided Repro
This issue can be reproduced in Snack or an attached project.
Needs: Attention
Issues where the author has responded to feedback.
Type: Unsupported Version
Issues reported to a version of React Native that is no longer supported
Description
In React Native's TextInput component, when the multiline={true} prop is set,
it interferes with the autocomplete functionality,
preventing the keyboard from detecting text from incoming messages.
This issue becomes particularly noticeable when implementing OTP (One-Time Password) functionalities.
The expected behavior is for the keyboard to automatically recognize text from incoming messages, and when tapping on the top row of suggested text, it should paste that text into the corresponding TextInput field.
However, due to the multiline={true} setting,
this functionality is disrupted, leading to an inconsistent user experience.
Steps to reproduce
Set multiline={true} in a TextInput component.
Trigger a scenario where autocomplete text is expected to be suggested by the keyboard (e.g., OTP input).
Observe that the keyboard fails to detect and suggest incoming message text.
Attempt to tap on the top row of suggested text, noting that it does not paste into the TextInput field as expected.
React Native Version
0.70.12
Affected Platforms
Runtime - Android, Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://snack.expo.dev/@buddhanag/multiline-autocomplete-keyboard?platform=web
Screenshots and Videos
This screen-recording is being done separately the iOS video is from a real device connected to react native metro server for debugging the issue.
this video explains when we use multiline the keyboard autocomplete text disappears.
RPReplay_Final1712820352.mov
Screen.Recording.2024-04-11.at.12.57.28.PM.mov
The text was updated successfully, but these errors were encountered: