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

[WEB] [Safari] Autofill does not fill both login fields #71275

Closed
ghost opened this issue Nov 26, 2020 · 11 comments · Fixed by flutter/engine#43058
Closed

[WEB] [Safari] Autofill does not fill both login fields #71275

ghost opened this issue Nov 26, 2020 · 11 comments · Fixed by flutter/engine#43058
Assignees
Labels
a: quality A truly polished experience a: text input Entering text in a text field or keyboard related problems browser: safari-macos only manifests in Safari on macOS f: material design flutter/packages/flutter/material repository. found in release: 3.7 Found to occur in 3.7 found in release: 3.10 Found to occur in 3.10 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list platform-web Web applications specifically

Comments

@ghost
Copy link

ghost commented Nov 26, 2020

  • When I autofill with the focus on the username textfield, it only fills the username.
  • When I autofill with the focus on the password textfield, it fills both username and password, but only if the username field is empty. If the username field is not empty, it does not fill the password.

This occurs both on mobile and desktop Safari.

Safari desktop: Version 14.0.1 (16610.2.11.51.8) on macOS Big Sur 11.0.1
Safari mobile: iOS 14.2

Tried with LastPass and Safari's saved passwords for autofill and the issue is the same.

Same issue in Firefox #68005.

AutofillGroup(
  child: Column(
    children: <Widget>[
      TextFormField(
        keyboardType: TextInputType.emailAddress,
        autofillHints: [
          widget.formType == AuthFormType.signIn
              ? AutofillHints.username
              : AutofillHints.newUsername,
          AutofillHints.email,
        ],
      ),
      TextFormField(
        autofillHints: [
          widget.formType == AuthFormType.signIn
              ? AutofillHints.password
              : AutofillHints.newPassword,
        ],
      ),
    ],
  ),
),
[✓] Flutter (Channel beta, 1.23.0-18.1.pre, on macOS 11.0.1 20B29 x86_64, locale
    en-GB)
    • Flutter version 1.23.0-18.1.pre at /Users/rh/Development/flutter
    • Framework revision 198df796aa (6 weeks ago), 2020-10-15 12:04:33 -0700
    • Engine revision 1d12d82d9c
    • Dart version 2.11.0 (build 2.11.0-213.1.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/rh/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.2, Build version 12B45b
    • CocoaPods version 1.10.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[✓] Connected device (2 available)
    • Web Server (web) • web-server • web-javascript • Flutter Tools
    • Chrome (web)     • chrome     • web-javascript • Google Chrome
      86.0.4240.198

• No issues found!
@pedromassangocode
Copy link

Hi @recycledhominid
Can you please provide a minimal complete reproducible code sample?
Thank you

@pedromassangocode pedromassangocode added in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds labels Nov 26, 2020
@ghost
Copy link
Author

ghost commented Nov 26, 2020

Here's the repo containing the sample app.

I've hosted it on Firebase, you can try it on Safari from desktop and mobile, I've got the issue with both.

And here's a GIF of the bug :)

You can see that when I try to fill the credentials from the username textfield, it only fills the username. Then, if I try to fill the password, it sends me back to the username textfield, without filling the password. If I clear the username and try to fill with the focus on the password, only then does it fill both.

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Nov 26, 2020
@pedromassangocode
Copy link

Reproducible on master branch.

flutter doctor -v
[✓] Flutter (Channel master, 1.24.0-8.0.pre.374, on Mac OS X 10.15.7 19H2
    darwin-x64, locale en)
    • Flutter version 1.24.0-8.0.pre.374 at
      /Users/pedromassango/dev/SDKs/flutter_master
    • Framework revision 183f0e797a (13 hours ago), 2020-11-26 19:12:28 +0100
    • Engine revision 20caf54969
    • Dart version 2.12.0 (build 2.12.0-76.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/pedromassango/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.1, Build version 12A7403
    • CocoaPods version 1.9.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Community Edition (version 2020.2.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 51.0.3
    • Dart plugin version 202.8070

[✓] VS Code (version 1.51.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (4 available)
    • sdk gphone x86 arm (mobile) • emulator-5554 • android-x86    • Android 11
      (API 30) (emulator)
    • macOS (desktop)             • macos         • darwin-x64     • Mac OS X
      10.15.7 19H2 darwin-x64
    • Web Server (web)            • web-server    • web-javascript • Flutter
      Tools
    • Chrome (web)                • chrome        • web-javascript • Google
      Chrome 86.0.4240.198

• No issues found!

@pedromassangocode pedromassangocode added a: text input Entering text in a text field or keyboard related problems browser: safari-macos only manifests in Safari on macOS found in release: 1.24 Found to occur in 1.24 has reproducible steps The issue has been confirmed reproducible and is ready to work on platform-web Web applications specifically a: quality A truly polished experience framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. and removed in triage Presently being triaged by the triage team labels Nov 27, 2020
@yjbanov yjbanov added the assigned for triage issue is assigned to a domain expert for further triage label Dec 3, 2020
@nturgut nturgut removed their assignment Dec 10, 2020
@nturgut nturgut added P2 Important issues not at the top of the work list and removed assigned for triage issue is assigned to a domain expert for further triage labels Dec 10, 2020
@Gerard-CK
Copy link

Any progress on this? This gives quite an annoying user experience IMO

@kiaxseventh
Copy link

i have same issue

@MorelSerge
Copy link

newPassword is entirely broken for me on Safari Web. It prevents any further input or focus on the TextField, I had to remove the autofill to make the form usable.

@hillelcoren
Copy link
Member

This issue was reported by one of our users, I believe the underlying problem may be that setting keyboardType to TextInputType.emailAddress is leaving the type of the HTML field as "text" rather than "email".

https://forum.invoiceninja.com/t/some-minor-ui-ux-issues-with-the-login/8876

@gijsrutten
Copy link

This might be relevant as well: https://support.1password.com/compatible-website-design/

@exaby73
Copy link
Member

exaby73 commented Apr 17, 2023

I can still reproduce this issue on Master (3.10.0-6.0.pre.29). Autofilling from the password field works as expected, but from the username field, only the username is filled

flutter doctor -v (Master)
[!] Flutter (Channel master, 3.10.0-6.0.pre.29, on macOS 13.3.1 22E261 darwin-arm64, locale en-US)
    • Flutter version 3.10.0-6.0.pre.29 on channel master at /Users/nabeelparkar/fvm/versions/master
    ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/2.19.5/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nabeelparkar/fvm/versions/master. Consider adding /Users/nabeelparkar/fvm/versions/master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 858d4ff634 (3 hours ago), 2023-04-16 23:21:38 -0400
    • Engine revision 360ca05311
    • Dart version 3.1.0 (build 3.1.0-11.0.dev)
    • DevTools version 2.23.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /Users/nabeelparkar/Library/Android/sdk/
    • Platform android-33, build-tools 33.0.2
    • ANDROID_SDK_ROOT = /Users/nabeelparkar/Library/Android/sdk/
    • Java binary at: /Users/nabeelparkar/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9862592/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.12.0

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /Applications/Brave Browser.app/Contents/MacOS/Brave Browser

[✓] Android Studio (version 2022.1)
    • Android Studio at /Users/nabeelparkar/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9619390/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] Android Studio (version 2022.2)
    • Android Studio at /Users/nabeelparkar/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9862592/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.77.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.62.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.3.1 22E261 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Brave Browser 112.1.50.114

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

@exaby73 exaby73 added found in release: 3.7 Found to occur in 3.7 and removed found in release: 1.24 Found to occur in 1.24 labels Apr 17, 2023
@exaby73 exaby73 added the found in release: 3.10 Found to occur in 3.10 label Apr 17, 2023
@Gerard-CK
Copy link

This has been reported almost 2 and a half years ago. Can someone please prioritize this?

@htoor3 htoor3 self-assigned this Jun 20, 2023
auto-submit bot pushed a commit to flutter/engine that referenced this issue Jun 23, 2023
We have an issue where autofill in Safari Desktop is only partially autofilling the form.  The only input that gets filled is the currently focused one. 

This is happening for a couple of reasons:
- We hide non-focused inputs that are part of the autofill form by sizing them to 0px height and width, among other styles.
- This doesn't cause issues in most browsers.  However, Safari does not respect offscreen or 0-sized inputs, and this leads to the partial form autofill issue. 

The solution is to make sure we hide the inputs in the rest of the form from the users, without hiding it from Safari. 

Fixes flutter/flutter#71275
@github-actions
Copy link

github-actions bot commented Jul 7, 2023

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: quality A truly polished experience a: text input Entering text in a text field or keyboard related problems browser: safari-macos only manifests in Safari on macOS f: material design flutter/packages/flutter/material repository. found in release: 3.7 Found to occur in 3.7 found in release: 3.10 Found to occur in 3.10 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list platform-web Web applications specifically
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants