Support custom autocomplete for hidden fields#47798
Conversation
|
I'm not sure this is quite enough because some other helpers will call Perhaps a better solution would be a config option on |
|
But before doing that it would be best to try to reproduce on the latest firefox, perhaps the bug was fixed after all? |
|
This does need fixing. Perhaps you could just use |
rails#43280 introduced an enforced `autocomplete="off"` to all hidden inputs generated by Rails to fix a [firefox bug](https://bugzilla.mozilla.org/show_bug.cgi?id=520561). Unfortunately it's also a legitimate use-case to specify an `autocomplete` with a value such as `username` and a value on a hidden input. This hints to the browser that (in this example) the username of a password reset form is what we've provided as the value and the password manager can store it as such. This commit only sets `autocomplete="off"` if another `autocomplete` value isn't provided. Supersedes rails#47798 which didn't seem to be as elegant a solution and didn't have proper tests.
rails#43280 introduced an enforced `autocomplete="off"` to all hidden inputs generated by Rails to fix a [firefox bug](https://bugzilla.mozilla.org/show_bug.cgi?id=520561). Unfortunately it's also a legitimate use-case to specify an `autocomplete` with a value such as `username` and a value on a hidden input. This hints to the browser that (in this example) the username of a password reset form is what we've provided as the value and the password manager can store it as such. This commit only sets `autocomplete="off"` if another `autocomplete` value isn't provided. Supersedes rails#47798 which didn't seem to be as elegant a solution and didn't have proper tests.
|
Not intending on merging this anymore? For the Firefox bug, apparently it's still a thing, so we probably ought to keep this work around for now. |
I thought it was fixed by #53512 |
See:
autocomplete="off") #46405 (comment)