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

iOS - TextInput shows password suggestion in the field above when secureTextEntry is enabled #49933

Open
OtavioStasiak opened this issue Mar 10, 2025 · 4 comments
Labels

Comments

@OtavioStasiak
Copy link

Description

I will use an exemple of first and second TextInput fields:

FirstField is with autoComplete="off", importantForAutofill="no", textContentType="none" and secureTextEntry={false};
SecondField is with autoComplete='password-new and textContentType='newPassword'' and secureTextEntry={true};
On iOS, the system's autofill behavior is causing a conflict with TextInput fields in React Native. Even with the correct configurations of autoComplete="off" and textContentType="none" on the first field, iOS continues to suggest saved passwords, but applies them to the wrong field. This happens especially when the bottom field (with secureTextEntry={true}) is set, but iOS tries to autofill the first field (which should not receive suggestions) with password information, ignoring the autoComplete="off" and importantForAutofill="no" configurations.

Steps to reproduce

open an app with two inputs;
set secureTextEmpty as true on the bottom Input;
if you open the app, the password suggestion will appear on the first input and not only in the second one.

React Native Version

0.76.6

Affected Platforms

Runtime - iOS

Output of npx @react-native-community/cli info

System:
  OS: macOS 15.3.1
  CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
  Memory: 705.14 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.12.0
    path: ~/.nvm/versions/node/v20.12.0/bin/node
  Yarn:
    version: 1.22.22
    path: /usr/local/bin/yarn
  npm:
    version: 10.5.0
    path: ~/.nvm/versions/node/v20.12.0/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.15.2
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2412.12266719
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /usr/bin/javac
  Ruby:
    version: 2.7.7
    path: /Users/otaviostasiak/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.6
    wanted: 0.73.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

no logs

Reproducer

https://snack.expo.dev/@otavio_stasiak/happy-red-truffles

Screenshots and Videos

Screen.Recording.2025-03-10.at.17.06.59.mov
@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.76.7. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot react-native-bot added Newer Patch Available Component: TextInput Related to the TextInput component. Platform: iOS iOS applications. labels Mar 10, 2025
@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@cipolleschi
Copy link
Contributor

Hi @OtavioStasiak, thanks for opening the issue.
You are using 0.76.6 in the repro, so I am assuming that it is running with the New Architecture.
Could you try disabling the new architecture and Report back whether that behavior is still there with the Legacy Architecture, please?

@OtavioStasiak
Copy link
Author

I tested the same issue on React Native 0.73.6, which uses the Legacy Architecture, and I was able to reproduce the same behavior. So, the issue doesn't seem to be related to the New Architecture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants