Closed Bug 1330561 Opened 7 years ago Closed 5 years ago

Autofill/Autocomplete/Insecure warning cannot be opened in username field right away in a new tab

Categories

(Toolkit :: Password Manager, defect, P1)

53 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla67
Tracking Status
firefox52 --- wontfix
firefox53 --- wontfix
firefox66 --- wontfix
firefox67 --- verified
firefox68 --- verified

People

(Reporter: aflorinescu, Assigned: jaws)

References

(Depends on 1 open bug)

Details

(Whiteboard: [passwords:fill-ui] )

Attachments

(2 files)

[OS:]
All

[Versions tested upon:]
53.0a1 20170111030235
52.a02 20170111004018

[Description:]
Having 2 or more saved passwords, first time that you call in a new tab the login form directly (w/o redirect) autocomplete/autofill/insecure warning will not be displayed.

[Steps:]
1. Create new profile.
2. Open http://imgur.com/login or https://github.com/login .
3. Save at least 2 user/passwords.
4. Close the tab, Open a new tab.
5. Input  http://imgur.com/login or https://github.com/login

[Actual Result:]
No autofill dropdown is opened. Although the username is focused, clicking in it or writing in it will not trigger neither autocomplete nor autofill.
Additionally, in the case of http the warning will not be shown either.

[Note:]
Switching the focus away will return the normal functionality.
Accessing the login pages from the redirect will again display the normal functionality.
I created a new Nightly profile on Mac OSX.

Went to http://imgur.com/login.  Username field is autofocused.  I observed warning in username and password field.  Saved a bogus login (test1, test1).
Saved a second bogus login (test2, test2).
Closed tab
Go to http://imgur.com/login in a new tab.  Username field is autofocused but dropdown doesn't appear.  Password field has dropdown.  Switching back to username field, it shows drop down.

Note that if you try this with a new window instead of a new tab, the drop down does appear right away.  Also, if you open a new tab and navigate it somewhere else first (ex: google.com), then go to http://imgur.com/signin, the drop down will appear right away.  Same issue on github.

Dropdown is missing on username field for brand new tabs only.

Maybe this has something to do with the meaning of first focus on a new tab?
See Also: → 1311301
Summary: Autofill/Autocomplete/Insecure warning not working first time you access direct login → Autofill/Autocomplete/Insecure warning doesn't auto-open in username field right away in a new tab
Priority: -- → P2
I suspect this is caused by attachToBrowser happening too late. DOMContentLoaded seems too late to me since a focus could have already happened I think. Either move attachToBrowser earlier or have AttachToBrowser check if a relevant field is already focused.

https://dxr.mozilla.org/mozilla-central/rev/1d025ac534a6333a8170a59a95a8a3673d4028ee/toolkit/content/browser-content.js#1471-1482

I can still reproduce this using the STR in comment 0 (with Github) and this can have a big impact on reliability for sites that autofocus.

Priority: P2 → P1
Whiteboard: [passwords:fill-ui]
Assignee: nobody → jaws
Status: NEW → ASSIGNED
Pushed by mozilla@noorenberghe.ca:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c5219b2bbf2b
Check if a relevant field is already focused when attaching autocomplete. r=MattN
https://hg.mozilla.org/integration/mozilla-inbound/rev/5e4f3a3033e9
Add a test that confirms inputs that are focused before FormFill has been attached still have their autocomplete popup. r=MattN
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Depends on: 1532118
Summary: Autofill/Autocomplete/Insecure warning doesn't auto-open in username field right away in a new tab → Autofill/Autocomplete/Insecure warning cannot be opened in username field right away in a new tab
Depends on: 1548575

Bug 1548575 was filled to handle the scenario in which the autocomplete doesn't fire for a login form on a new tab, when it's the first thing we do in the new tab.

Taking in account comment 8, marking this issue as verified for Windows 10, Ubuntu 16.04, Mac 10.13.6 on :

Nightly 68.0a1 / 20190502220333
Beta 67.0b15 2019-04-29

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: