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

Incorrect TextInput email field suggestion for "Hide my Email" (iOS) #46022

Open
troyshu opened this issue Aug 14, 2024 · 13 comments
Open

Incorrect TextInput email field suggestion for "Hide my Email" (iOS) #46022

troyshu opened this issue Aug 14, 2024 · 13 comments
Labels
Component: TextInput Related to the TextInput component. Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project.

Comments

@troyshu
Copy link

troyshu commented Aug 14, 2024

Description

When entering text into an email TextField (textContentType="emailAddress"), the "Hide my Email" suggestion behaves incorrectly on a plugged in iOS device (using Apple ID with iCloud+ and thus "Hide my Email" feature):

"Hide my Email" is suggested twice. Selecting the first "Hide my email" incorrectly inserts the string "Hide my email" into the text field.

See attached screen recording.

Steps to reproduce

  1. Clone https://github.com/troyshu/expo-text-input-test
  2. Plug in iOS device, enable USB debugging
  3. npm install then npm run ios:device to run on device
  4. Try to enter an email in the email field.

React Native Version

0.76.1 (Expo 52)

Also occurred on React Native 0.74.5 and Expo 51: https://github.com/troyshu/expo-text-input-test/tree/979d9fc382353f4aa117cad625d00e7e1f05f3a9

Affected Platforms

Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 14.5
  CPU: (12) arm64 Apple M2 Max
  Memory: 1.28 GB / 64.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.6.0
    path: /opt/homebrew/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.8.2
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2024.08.12.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.5
      - iOS 17.5
      - macOS 14.5
      - tvOS 17.5
      - visionOS 1.2
      - watchOS 10.5
  Android SDK:
    API Levels:
      - "28"
      - "29"
      - "30"
      - "31"
      - "33"
      - "34"
    Build Tools:
      - 29.0.2
      - 30.0.2
      - 30.0.3
      - 33.0.0
      - 33.0.1
      - 34.0.0
    System Images:
      - android-30 | Google APIs Intel x86 Atom
      - android-30 | Google Play Intel x86 Atom
      - android-30 | Google Play Intel x86 Atom_64
      - android-31 | Google APIs Intel x86 Atom_64
      - android-34 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11330709
  Xcode:
    version: 15.4/15F31d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.4.1
    path: /usr/bin/javac
  Ruby:
    version: 3.2.2
    path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: latest
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.1
    wanted: 0.76.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

NA

Reproducer

https://github.com/troyshu/expo-text-input-test

Screenshots and Videos

Untitled.mp4
@react-native-bot react-native-bot added the Component: TextInput Related to the TextInput component. label Aug 14, 2024
@troyshu troyshu changed the title Incorrect TextInput email field suggestions (contacts, Hide my email) Incorrect TextInput email field suggestion for "Hide my Email" (iOS) Aug 14, 2024
@cortinico cortinico added Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. and removed Needs: Triage 🔍 labels Aug 15, 2024
@IkeyBenz
Copy link

I'm noticing this as well.

@troyshu
Copy link
Author

troyshu commented Oct 30, 2024

(pinging @cortinico just because they're the only RN contributor on this issue) Any thoughts from the RN team about this issue? Having two "Hide my email" suggestions over an email input field, and one of them inserting the string "Hide my email" into the email input when tapped, is confusing for users and leaves an app feeling unpolished for them.

@cortinico
Copy link
Contributor

Not sure if this issue should go in the expo or react-native repo, but posting it here.

Have you opened an issue on Expo as well by any chance?

@troyshu
Copy link
Author

troyshu commented Oct 30, 2024

Thanks for responding @cortinico. I hadn't, but I just posted the issue to expo's repo as well: expo/expo#32483. Correct me if I'm wrong, but since this issue is with a react-native component, (import { TextInput } from "react-native"), shouldn't it be looked at here?

@cortinico
Copy link
Contributor

Thanks for responding @cortinico. I hadn't, but I just posted the issue to expo's repo as well: expo/expo#32483. Correct me if I'm wrong, but since this issue is with a react-native component, (import { TextInput } from "react-native"), shouldn't it be looked at here?

Yes you're right, but our team is extremely small and doesn't have capacity to look into any issue that gets reported (we get a lot of them). As you're using Expo, having the issue opened also in Expo will help to exclude any problems which might be Expo specific

@troyshu
Copy link
Author

troyshu commented Oct 31, 2024

Totally understand. Thanks for all the amazing work that you and the RN team do! Hope someone can take a look at this soon.

@brentvatne
Copy link
Collaborator

@cortinico - this shouldn't be related to expo, we don't interfere with core apis from react-native like TextInput

@brentvatne
Copy link
Collaborator

@troyshu - can you try updating to 0.76 and seeing if that resolves your issue? https://expo.dev/changelog/2024/10-24-sdk-52-beta - you can run npx expo install expo@next --fix in your repro project

@troyshu
Copy link
Author

troyshu commented Oct 31, 2024

I ran npx expo install expo@next --fix to update to Expo 52 beta and React Native 0.76, still seeing the same issue on my iOS device (repro repo at https://github.com/troyshu/expo-text-input-test updated)

@cortinico
Copy link
Contributor

cc @cipolleschi if you have any insights on what could be causing this on iOS

@cipolleschi
Copy link
Contributor

@troyshu is this happening also if you opt out from the New Architecture? Just to understand whether it has always been like that or not. I don't see anything in the codebase that suggests that we add the text twice.

@troyshu
Copy link
Author

troyshu commented Nov 11, 2024

Thanks for taking a look at this @cipolleschi. Yes, the issue still happens when not using the new architecture (e.g. on Expo 51): see reproduction repo at this commit. The most recent commit of reproduction repo is on Expo 52 (new architecture).

I saw this issue in the wild the other day in the Claude iOS app. Instantly knew they were using React Native haha

RPReplay.Final.mov

EDIT: also still seeing the issue after disabling new architecture in Expo 52 with newArchEnabled: false in app.json

@migueldaipre
Copy link
Collaborator

This is probably related to something native on the apple side. Flutter has the same issue. As can be seen here

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.
Projects
None yet
Development

No branches or pull requests

7 participants