RESOLVED FIXED 203299
WKWebView: Username/Password autocomplete does not prompt on non-password inputs in Shadow DOM
https://bugs.webkit.org/show_bug.cgi?id=203299
Summary WKWebView: Username/Password autocomplete does not prompt on non-password inp...
Liam DeBeasi
Reported 2019-10-23 10:02:39 PDT
Created attachment 381686 [details] iOS app reproduction When tapping into a non-password input in the Shadow DOM (for example, type="email") the "Passwords" autocomplete option does not appear. This bug only happens in WKWebView and does not happen in Safari. Steps to reproduce: 1. Download the attached .zip, and run the extracted Xcode project on a physical iOS device. 2. Tap "Light DOM Username". Notice that the "Password" autocomplete option appears. 3. Tap "Shadow DOM Username". Notice that the "Password" autocomplete option does not appear. 4. Open the following CodePen in Safari on the iOS device: https://codepen.io/liamdebeasi/pen/ZEEeRPo (This is the example that is loaded in the WKWebView app) 5. Tap "Light DOM Username". Notice that the "Password" autocomplete option appears. 6. Tap "Shadow DOM Username". Notice that the "Password" autocomplete option appears. Expected Results: I would expect that the "Passwords" autocomplete option appears for username/password inputs regardless of whether or not the input is in the Shadow DOM.
Attachments
iOS app reproduction (56.37 KB, application/zip)
2019-10-23 10:02 PDT, Liam DeBeasi
no flags
Radar WebKit Bug Importer
Comment 1 2019-10-23 10:43:15 PDT
Daniel Ehrhardt
Comment 2 2020-06-20 15:51:20 PDT
More and more HTML Apps go to the App Store. Could someone please take a look into this Issue?
Calvin Ho
Comment 3 2020-10-01 21:46:42 PDT
any update on this bug? Thanks..
Ryosuke Niwa
Comment 4 2020-10-02 20:10:08 PDT
I think the bug is somewhere in AutofillElements. Interesting, this code also uses FocusController::previousFocusableElement/nextFocusableElement so it might be a duplicate of the bug 203292.
Daniel
Comment 5 2021-01-05 10:55:41 PST
Apple, please don't trivialize this. It really affects our users' experience when moving from web to the app experience.
Ryosuke Niwa
Comment 6 2021-01-05 14:17:20 PST
(In reply to Daniel from comment #5) > Apple, please don't trivialize this. It really affects our users' experience > when moving from web to the app experience. Could you confirm that what you're experiencing is an issue with autofill within WKWebView in a third party app, and not about autofill in Safari?
Daniel
Comment 7 2021-01-05 14:24:00 PST
(In reply to Ryosuke Niwa from comment #6) > Could you confirm that what you're experiencing is an issue with autofill > within WKWebView in a third party app, and not about autofill in Safari? Of course, it's about a Cordova app. Relevant dependencies: - cordova-ios 6.1.1 https://github.com/apache/cordova-ios - cordova-plugin-ionic-webview 5.0.0 https://github.com/ionic-team/cordova-plugin-ionic-webview
Liam DeBeasi
Comment 8 2021-02-02 06:54:09 PST
This issue appears to be fixed in iOS 14.5 beta 1. Thank you! (seems like it was the same issue that caused https://bugs.webkit.org/show_bug.cgi?id=203292)
Ryosuke Niwa
Comment 9 2021-02-02 10:19:04 PST
(In reply to Liam DeBeasi from comment #8) > This issue appears to be fixed in iOS 14.5 beta 1. Thank you! (seems like it > was the same issue that caused > https://bugs.webkit.org/show_bug.cgi?id=203292) That's a bit surprising. There is definitely code here which needs to be updated.
Ashley Medway
Comment 10 2021-02-02 10:22:06 PST
I am also seeing this fixed in iOS 14.5 beta 1
Teodor
Comment 11 2021-06-15 19:40:08 PDT
iOS 14.7 Public Beta 3 Issue is still present. Potentially a regression from 14.5 Beta 1.
Samuel Sheldon
Comment 12 2021-11-09 09:53:05 PST
I have tried this in iOS 15.1 and this issue is still not fixed. This is a critical feature for many developers, is there any way to get an estimate on a fix? Or at the very lease a temporary work around or solution we can use in the mean time? Any update or assistance you can give will be helpful, thanks!
Ryosuke Niwa
Comment 13 2021-11-09 15:52:47 PST
Just to be clear, this issue tracks user/password autofill feature in non-Safari WKWebView clients. The issue in Safari is tracked by https://bugs.webkit.org/show_bug.cgi?id=172567.
Samuel Sheldon
Comment 14 2021-11-10 05:55:20 PST
(In reply to Ryosuke Niwa from comment #13) > Just to be clear, this issue tracks user/password autofill feature in > non-Safari WKWebView clients. The issue in Safari is tracked by > https://bugs.webkit.org/show_bug.cgi?id=172567. Good morning Ryosuke Niwa, you are right I was looking for the Safari based WKWebView bug. Thank you for passing it along to me! I will make my comments there
Brent Fulgham
Comment 15 2022-02-10 20:40:26 PST
This is actually: <rdar://27205947>
Ryosuke Niwa
Comment 16 2022-02-11 10:37:49 PST
(In reply to Brent Fulgham from comment #15) > This is actually: > <rdar://27205947> Oh, this is not that! That radar is about Safari. This bug is about autofill feature that exist in WKWebView, not Safari.
Wolf Walter
Comment 17 2022-03-22 06:22:21 PDT
This bug does affect my iOS app build with Ionic, Angular and Capacitor.
Ryosuke Niwa
Comment 18 2022-07-03 00:20:02 PDT
(In reply to Ryosuke Niwa from comment #9) > (In reply to Liam DeBeasi from comment #8) > > This issue appears to be fixed in iOS 14.5 beta 1. Thank you! (seems like it > > was the same issue that caused > > https://bugs.webkit.org/show_bug.cgi?id=203292) > > That's a bit surprising. There is definitely code here which needs to be > updated. Oh, I was misunderstanding this problem. WKWebView's autofill feature is indeed fixed by that code change because we use the same functions to find autofillable elements.
Ryosuke Niwa
Comment 19 2022-07-03 00:29:40 PDT
Ryosuke Niwa
Comment 20 2022-07-03 00:30:06 PDT
Let's add a test case so that this won't regress over time.
EWS
Comment 21 2022-07-03 13:18:10 PDT
Committed 252105@main (1671a015250d): <https://commits.webkit.org/252105@main> Reviewed commits have been landed. Closing PR #2037 and removing active labels.
Ryosuke Niwa
Comment 22 2022-07-03 13:22:07 PDT
The bug has been fixed in https://commits.webkit.org/r269059. Autofill not functioning across shadow boundaries in Safari is tracked by the bug 172567.
Mischa
Comment 23 2022-09-05 16:00:21 PDT
Ryosuke Niwa
Comment 24 2022-09-05 16:38:26 PDT
(In reply to Mischa from comment #23) > Does this fix also solve https://bugs.webkit.org/show_bug.cgi?id=226023 No.
Note You need to log in before you can comment on or make changes to this bug.