Skip to content

[iOS] wrong form data value when using autocomplete (playground demo included) #9486

Closed

Description

@MrSnoozles

Describe the bug
We got a lot of users complaining that they didn't receive the signup email. When checking their accounts we noticed that they often entered an email address like "[email protected]" or "[email protected]". We thought they were just mistyping their addresses, until we noticed that it had to do with autocompleting emails on ios.

To Reproduce

  • on iOS (tested with iOS 14) start typing an email e.g. "jeff"
  • now you see that "[email protected]" is suggested. click on the suggestion to use it
  • the content of the Textfield is now "[email protected]"
  • the content of the data model however is "[email protected]" (what you typed before + the full autosuggestion)

Expected behavior
The data model should contain "[email protected]" instead of "[email protected]"

Sample project
https://play.nativescript.org/?template=play-js&id=METmUA (Plain JS)
https://play.nativescript.org/?template=play-vue&id=eOi529 (VueJS)

Video preview
We're typing "et" and then using the autosuggested email "[email protected]". The data model then contains "[email protected]"

IMG_7702.MP4

Environment

  • CLI: 8.0.2
  • Cross-platform modules: 8.0.8
  • Android Runtime: 8.0.0
  • iOS Runtime: 8.0.0

Activity

  1. changed the title [-][iOS] wrong form data value when using autocomplete[/-] [+][iOS] wrong form data value when using autocomplete (playground demo included)[/+] on Aug 6, 2021
  2. MrSnoozles commented on May 26, 2023

    @MrSnoozles
    Author

    @NathanWalker We're seeing this error again after updating to 8.5.x, It's a pretty big issue as users sign up with the wrong email.

    Could it be that this.valueFormatter returns true when it shouldn't?

    if (this.valueFormatter) {

    Then the fix from the PR is not applied:

    const shouldReplaceString = (textField.secureTextEntry && this.firstEdit) || delta > 1;
    if (shouldReplaceString) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions