Checkbox state change is ignored on page reload
Categories
(Firefox :: Session Restore, defect)
Tracking
()
People
(Reporter: styu007, Unassigned)
Details
(Keywords: dupeme)
Checkboxes are ignoring the checked state changes on page reloads even if the user didn't touch the checkbox. I understand that it is intended to overwrite the value set by the html attribute with the value the user was setting manually, but changes to the checkboxes checked property are being ignored even if the user didn't touch them at all. Currently, the checkboxes didn't respect changes on the backend between page reloads.
I think this overwrite should only happen after the user was touching the specific checkbox. The current behavior is very confusing, I have spent hours figuring out that it was caused by Firefox's behavior (which is different from webkit).
Comment 1•3 years ago
|
||
You can use autocomplete="off" to prevent this behavior, fwiw.
| Reporter | ||
Comment 2•3 years ago
|
||
Thank you, I found it out, but it took me more than an hour as we are using a lot of javascript and I thought that our own code is causing the issue. It is just a very confusing behavior at the moment.
I forgot to mention that I may have clicked on the checkbox, so it may have triggered autocomplete to work on that checkbox, but we are using requestSubmit() on every change, so the form was already submitted when the checkbox was checked. I think autocomplete should reset its dirty flag on submit, even if it was happened with javascript. Other properties can easily affect the value of the checkbox on the backend, and then the wrong value is represented to the user.
Comment 3•3 years ago
|
||
The severity field is not set for this bug.
:TYLin, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 4•3 years ago
|
||
It looks like https://stackoverflow.com/questions/299811/why-does-the-checkbox-stay-checked-when-reloading-the-page might be describing the same compat issue (vs. WebKit).
Also, I think this is more about the state of the checkbox than its layout/presentation, so this probably belongs in DOM:Forms; reclassifying.
Updated•3 years ago
|
Comment 5•3 years ago
|
||
The severity field is not set for this bug.
:dao, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 6•3 years ago
•
|
||
I've managed to reproduce this issue using the example given in ticket https://stackoverflow.com/questions/299811/why-does-the-checkbox-stay-checked-when-reloading-the-page(from Comment 4) on the latest versions Nightly 111.0a1 and Firefox 109.0 on Windows 10 x64.
Setting as NEW.
Description
•