New issue
Advanced search Search tips

Issue 788189 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 780834
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Autofill triggers Focus Events whenever input is added to the DOM

Reported by s...@hinderlingvolkart.com, Nov 23 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36

Example URL:
https://s.codepen.io/betabong/debug/JOvQPK

Steps to reproduce the problem:
Open https://s.codepen.io/betabong/debug/JOvQPK
1. Enter any credentials and Submit
2. Save the password if you're asked (if not click on the key icon in the URL field)
3. Reload the page
4. Click the button "Add Input to DOM"

What is the expected behavior?
The only focus event logged should be: "Received focus: add of controls" 

What went wrong?
The autofill feature seems to observe the DOM and autofills whenever an input element is added to the DOM. Now that's fine, but it's not fine that the feature triggers focus events like a maniac, not on page load but especially not when the DOM changes.

(IMHO it should only trigger input and change events once)

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes 61

Does this work in other browsers? Yes

Chrome version: 62.0.3202.94  Channel: stable
OS Version: OS X 10.13.1
Flash Version: 

The resulting problem can be quite severe actually, especially for websites that try to be good by caring about focus events for accessibility reasons. It's good practice to listen for focus events outside of flyouts for example and close the flyout if so.

You can visit https://www.swiss.com open the Login flyout and enter credentials (and enter and save the credentials). Now when you reload the page and try to open the flyout, it will close soon afterwards. Because it thinks that the user focused an element outside of the flyout.
 
Components: -Blink UI>Browser>Autofill
Cc: ma...@chromium.org

Comment 3 by sdy@chromium.org, Dec 6 2017

Status: Untriaged (was: Unconfirmed)
mathp@, any thoughts?

Comment 4 by ma...@chromium.org, Dec 7 2017

Owner: se...@chromium.org
Status: Assigned (was: Untriaged)
Sebastien is looking at nearby code recently, I'll let him assess what we should do here.
Can someone please have a look at this? We are starting to see more and more problems related to this misbehaviour – often automatic tests won't catch those issues because they are coupled to autofill. Please please please fix it: focus events should definitely not be triggered like that.

Comment 6 by se...@chromium.org, Jan 5 2018

Hi! This is only for credential autofill right? 
We've only seen it with credentials. But if there are more inputs autofilled automatically, that might be affected too.

Comment 8 by se...@chromium.org, Jan 8 2018

Mergedinto: 780834
Status: Duplicate (was: Assigned)
Ok thanks for the clarification. I do think then that this is the same issue as crbug.com/780834. Merging it into there.

Sign in to add a comment