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

Autocomplete Failure in React Native TextInput with multiline={true} Prop (TextInput) #44036

Open
BuddhaNag12 opened this issue Apr 11, 2024 · 2 comments
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

Comments

@BuddhaNag12
Copy link

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

System:
    OS: macOS 14.4
    CPU: (10) arm64 Apple M2 Pro
    Memory: 70.38 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.17.0 - ~/.nvm/versions/node/v18.17.0/bin/node
    Yarn: 1.22.21 - /opt/homebrew/bin/yarn
    npm: 9.6.7 - ~/.nvm/versions/node/v18.17.0/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.15.2 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, visionOS 1.0, watchOS 10.2
    Android SDK:
      API Levels: 28, 29, 30, 31, 32, 33, 34
      Build Tools: 30.0.2, 30.0.3, 31.0.0, 33.0.2, 34.0.0
      System Images: android-30 | Intel x86_64 Atom, android-34 | Google APIs ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: 2023.2 AI-232.10227.8.2321.11479570
    Xcode: 15.2/15C500b - /usr/bin/xcodebuild
  Languages:
    Java: 21.0.2 - /opt/homebrew/opt/openjdk/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.1.0 => 18.1.0 
    react-native: 0.70.12 => 0.70.12 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Stacktrace or Logs

No stack trace as this is not crash failure issue

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
Copy link

⚠️ Unsupported Version of React Native
ℹ️ It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

@github-actions github-actions bot added Type: Unsupported Version Issues reported to a version of React Native that is no longer supported Needs: Author Feedback Component: TextInput Related to the TextInput component. and removed Needs: Triage 🔍 labels Apr 11, 2024
@cortinico cortinico added the Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. label Apr 11, 2024
@BuddhaNag12
Copy link
Author

Issue persist on RN: 0.73.6

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants