Unless I am missing something then this docblock in all fields is wrong
All we ever do is this
Which means that we can never have any value for autocomplete in the xml other than 'off'
You can see this by changing the value for autocomplete here to anything else and instead of the autocomplete being output with the new value it is removed.
joomla-cms/administrator/components/com_users/forms/user.xml
Lines 20 to 30 in bc42bb1
Autocomplete has a lot of useful values that we could/should be using see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
For example autocomplete=off
really doesn't do anything on password fields. Instead we should be using autocomplete="new-password"
It looks to me that it can be fixed by changing the code to
$autocomplete ? '' : 'autocomplete="' . $autocomplete .'"',
And autocomplete is not the same as autofill
Chrome will still respect this tag for autocomplete data, it will not respect it for autofill data
But I am probably missing something
cc @HLeithner @wilsonge @mbabker
Labels |
Added:
?
|
And I am not missing something based on the docblock?
I think it was built to disable autocomplete on password fields back in the day. i vaguely recall buggy browser behaviour back in the early html5 browser days.
But i don't see any reason we can't expand the scope to include custom values there
It is the same in all fields not just the password field
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-10-04 11:37:03 |
Closed_By | ⇒ | Quy |
See PR #26467
Your solution sounds correct to me