react / react/react-native

iOS (Fabric): Recycled TextInput after Password Autofill becomes non-editable (yellow background) and stops updating

Aperta
#53,050 19 commenti 17 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Component: TextInput Needs: Triage :mag: Platform: iOS Type: New Architecture
Lingua principale
C++
Stelle
127k
Fork
25.3k
Merge medio
1g 23h
PR unite (30g)
4

Descrizione

Description

When a TextInput triggers iOS Password Autofill and is then recycled by React Native Fabric, the recycled input becomes unusable.

⚠️ Note about provided repo ⚠️: Since this is related to the password autofill of iOS. You would need to make sure to update ios/SecureInput/SecureInput.entitlements to point to a valid endpoint for the correct team id and app bundle. Otherwise it will not be reproduced

Steps to reproduce
  1. Screen A: two inputs
  • textContentType="username" / autoComplete="username"
  • textContentType="newPassword" / autoComplete="new-password" / secureTextEntry
  • App configured for Password Autofill (Associated Domains with webcredentials: and valid AASA).
  1. On device (AutoFill enabled), type username, focus password, accept strong password.
  2. App authenticates and navigates to Screen B (e.g., onboarding) with two regular TextInputs (no password field).
  3. Due to Fabric recycling, the native view from the password field on Screen A is reused for one of Screen B’s inputs and that input is no longer editable/usable blocking further user flow
React Native Version

0.80.2

Affected Platforms

Runtime - iOS

Areas

Fabric - The New Renderer

Output of npx @react-native-community/cli info
info Fetching system and libraries information...
System:
  OS: macOS 15.5
  CPU: (14) arm64 Apple M3 Max
  Memory: 2.46 GB / 36.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.14.0
    path: ~/.nvm/versions/node/v22.14.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v22.14.0/bin/yarn
  npm:
    version: 10.9.2
    path: ~/.nvm/versions/node/v22.14.0/bin/npm
  Watchman:
    version: 2025.04.14.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/itsramiel/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.5
      - iOS 18.5
      - macOS 15.5
      - tvOS 18.5
      - visionOS 2.5
      - watchOS 11.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.3 AI-243.24978.46.2431.13363775
  Xcode:
    version: 16.4/16F6
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 3.4.3
    path: /Users/itsramiel/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 19.1.1
    wanted: 19.1.1
  react:
    installed: 19.1.0
    wanted: 19.1.0
  react-native:
    installed: 0.80.2
    wanted: 0.80.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true
Stacktrace or Logs
No crash or failure to provide stack trace for
MANDATORY Reproducer

https://github.com/itsramiel/SecureInput

Screenshots and Videos

Notice that the First Name input is no longer editable no matter what I type in. This is not just visually. The callback is not called

https://github.com/user-attachments/assets/8c0a82b2-d3dd-4e3d-a8e3-7f6f9d7ac890

Extra Context

I tried to see if it is possible to recover the UITextField from this state in a standalone swift project by changing the textContextType and isSecureTextEntry so that this can be done in prepareForRecycle but unfortunately I was not successful in finding a way to recover from this state. I am not sure if such a TextInput should just be not recycled at all.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Esegui il riproduttore obbligatorio di SecureInput su un dispositivo iOS dopo aver configurato ios/SecureInput/SecureInput.entitlements con un endpoint valido, quindi ispeziona il percorso di riciclo di Fabric TextInput e il comportamento di prepareForRecycle. Verifica che una vista nativa riciclata dal campo password rimanga modificabile e invochi callback quando viene riutilizzata dall’input normale di Screen B.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
ios, react-native
Ambito
mobile
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.