Bug 226023 - HTMLInputElement::setValueForUser should dispatch an input event
Summary: HTMLInputElement::setValueForUser should dispatch an input event
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Safari 14
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords: InRadar
: 250989 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-05-20 09:13 PDT by Liam DeBeasi
Modified: 2023-01-26 10:19 PST (History)
14 users (show)

See Also:


Attachments
Xcode app (30.28 KB, application/zip)
2021-05-20 09:13 PDT, Liam DeBeasi
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Liam DeBeasi 2021-05-20 09:13:38 PDT
Created attachment 429177 [details]
Xcode app

Given an email text field and a password text field, autocompleting on the password text field does not result in the email text field firing an input event. In this scenario, I am using the iOS Keychain manager to autofill both the email and password text fields.

Expected Behavior:

When autocompleting on the password text field, I would expect that the input event is fired for both email and password text fields since their values have changed.

Actual Behavior:

The input event is only fired for the password text field when initiating the autofill from that text field.

Steps to Reproduce:

1. Download the attached Xcode application and deploy on an iOS device.
2. Open Safari Dev Tools and inspect this application.
3. Tap into the password text field and use the iOS Keychain to autofill an email/password combination.
4. Visually, both the email and password fields are filled, but only the password value is shown above the text fields.
5. Look at the dev tools console and you should see that the input event is only fired for the password text field.
6. Repeat these steps in Safari on https://wizardly-easley-1439a0.netlify.app/ (This URL is what the webview loads). You should notice that the input events are fired for both the email and password text fields as expected.

Other Information:

- I can reproduce this on iOS 13 and iOS 14.
- This is impacting Ionic Framework applications and has resulted in at least one app getting rejected from the iOS App Store, so it would be great if this could be looked at (See https://github.com/ionic-team/ionic-framework/issues/23335 for more context)
Comment 1 Radar WebKit Bug Importer 2021-05-27 09:14:15 PDT
<rdar://problem/78571564>
Comment 2 Jeff C Johnson 2022-04-05 00:02:52 PDT
I would like to add that we have an iOS app that is experiencing this bug so a fix would be very welcome.
Comment 3 Mischa 2022-08-08 13:09:14 PDT
I'm also experiencing this with iOS 16 beta 4. Very annoying bug. This is not only related to Ionic. We use Laravel with Livewire and Alpine for our website that we load in WKWebView.
Comment 4 Aidar 2022-09-14 02:55:45 PDT
Still actual for my app. Please fix this bug🙏
Comment 5 Scott VandenToorn 2022-11-03 10:09:08 PDT
I am also experiencing this problem.
Comment 6 Michael Catanzaro 2023-01-23 09:50:02 PST
If any of you who can reproduce this are comfortable with building your own WebKit, please test https://github.com/WebKit/WebKit/pull/8957 and see if that fixes it for you. Probably will, but I'm a Linux dev so I can't be sure.
Comment 7 Aditya Keerthi 2023-01-24 10:24:22 PST
(In reply to Michael Catanzaro from comment #6)
> If any of you who can reproduce this are comfortable with building your own
> WebKit, please test https://github.com/WebKit/WebKit/pull/8957 and see if
> that fixes it for you. Probably will, but I'm a Linux dev so I can't be sure.

I have confirmed that https://github.com/WebKit/WebKit/pull/8957 fixes this issue.
Comment 8 Michael Catanzaro 2023-01-24 10:35:20 PST
*** Bug 250989 has been marked as a duplicate of this bug. ***
Comment 9 EWS 2023-01-26 10:19:01 PST
Committed 259434@main (fd13c500871d): <https://commits.webkit.org/259434@main>

Reviewed commits have been landed. Closing PR #8957 and removing active labels.