iOS - TextInput shows password suggestion in the field above when secureTextEntry is enabled #49933
Labels
Component: TextInput
Related to the TextInput component.
Needs: Triage 🔍
Newer Patch Available
Platform: iOS
iOS applications.
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
Stacktrace or Logs
Reproducer
https://snack.expo.dev/@otavio_stasiak/happy-red-truffles
Screenshots and Videos
Screen.Recording.2025-03-10.at.17.06.59.mov
The text was updated successfully, but these errors were encountered: