Closed Bug 1583957 Opened 5 years ago Closed 5 years ago

input autocomplete property is empty for username/new-password/current-password values

Categories

(Core :: DOM: Core & HTML, defect, P1)

69 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox-esr68 71+ fixed
firefox67 --- wontfix
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- fixed
firefox72 --- fixed

People

(Reporter: dlockhart, Assigned: MattN)

References

()

Details

(Keywords: site-compat, Whiteboard: [passwords:heuristics] )

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36

Steps to reproduce:

  1. Create a <input type="text" autocomplete="username"> element
  2. In JavaScript, get the element and access its "autocomplete" property (e.g. document.getElementById('elem').autocomplete).

Actual results:

The value of the property is the empty string.

Expected results:

The property should be "username" like it is in other browsers, and like it is if you call "getAttribute('autocomplete')".

Hi Dave,

Thanks for reporting this bug.

Could you please share with us a test page and further steps so we can test this on our end?

Please also let us know if you can reproduce the issue by testing on the latest Firefox Nightly version, you can download it from here: https://nightly.mozilla.org/.

Thanks!

Flags: needinfo?(dlockhart)

Hi Virginia,

Here's a test page that demonstrates the issue:
https://codepen.io/dlockhart/pen/JjjXeYO?editors=1111

I can confirm the issue in Firefox 69.0.3 and in the Nightly version 71.

Flags: needinfo?(dlockhart)

Hi Dave,

Thanks for providing us with the test page.

I was able to reproduce it on Firefox Nightly 72.0a1 (2019-10-22) (64-bit) on Mac OSX 10.14 and Windows 10.

I'll add a product and component so the corresponding dev team can take a look at this.

Regards,

Status: UNCONFIRMED → NEW
Component: Untriaged → Form Manager
Ever confirmed: true
Product: Firefox → Toolkit

Hi Dave, it's been a long time since my internship at D2L in 2008 👋

This was intentional to support feature detection by web developers since we didn't use this value for anything until bug 917325 (Fx67). At that point it should have been made available. I will also fix a similar issue for new-password which we use since bug 1119063 (Fx67).

You can see the list of other autocomplete token values that we don't support.

Assignee: nobody → MattN+bmo
Blocks: 917325, 1119063
Status: NEW → ASSIGNED
Component: Form Manager → DOM: Core & HTML
Flags: qe-verify-
Keywords: site-compat
Priority: -- → P1
Product: Toolkit → Core
Summary: input autocomplete property is empty → input autocomplete property is empty for username/new-password/current-password values
Whiteboard: [passwords:heuristics]
Pushed by mozilla@noorenberghe.ca: https://hg.mozilla.org/integration/autoland/rev/6c6375cd9adb Indicate support for autocomplete=(username|new-password|current-password). r=farre

Comment on attachment 9103734 [details]
Bug 1583957 - Indicate support for autocomplete=(username|new-password|current-password). r=farre

Beta/Release Uplift Approval Request

  • User impact if declined: Site that rely on element.autocomplete to return non-empty values for username/new-password/current-password may be broken. This is useful to fix since we recently started supporting these tokens.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Trivial patch to indicate that an autocomplete token is now supported.
  • String changes made/needed: None
Attachment #9103734 - Flags: approval-mozilla-beta?
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72

Comment on attachment 9103734 [details]
Bug 1583957 - Indicate support for autocomplete=(username|new-password|current-password). r=farre

Low risk patch with tests early in the beta cycle, uplift approved for 71 beta 5, thanks!

Attachment #9103734 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Is this something you wanted to nominate for ESR68 too? It grafts cleanly as-landed.

Flags: needinfo?(MattN+bmo)
Flags: in-testsuite+

Comment on attachment 9103734 [details]
Bug 1583957 - Indicate support for autocomplete=(username|new-password|current-password). r=farre

It would be nice since the bugs that regressed this went in 67 but this is the only report I've seen about the issue so I don't think it's pressing. It could help sites to not require fallbacks to input.getAttribute("autocomplete") (which has different behaviour). Up to you.

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Improve web compatibility by aligning with Blink/Webkit on these autocomplete token values.
  • User impact if declined: Potential incorrect behaviour of website JS related to username/password fields.
  • Fix Landed on Version: 71.0.0
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Trivial patch to indicate that an autocomplete token is now supported.
  • String or UUID changes made by this patch: None
Flags: needinfo?(MattN+bmo)
Attachment #9103734 - Flags: approval-mozilla-esr68?

Comment on attachment 9103734 [details]
Bug 1583957 - Indicate support for autocomplete=(username|new-password|current-password). r=farre

While this doesn't sound pressing the fix looks trivial and we are still early in the 68esr cycle, so let's uplift and make password autocomplete work as intended.

Attachment #9103734 - Flags: approval-mozilla-esr68? → approval-mozilla-esr68+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: