Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 539228 - Firefox remembers form contents based on order instead of on id or value (form state restoration)
: Firefox remembers form contents based on order instead of on id or value (for...
Status: NEW
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal with 2 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Andrew Overholt [:overholt]
Depends on:
  Show dependency treegraph
Reported: 2010-01-12 08:06 PST by Michiel Beijen
Modified: 2013-09-28 13:19 PDT (History)
7 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description Michiel Beijen 2010-01-12 08:06:29 PST
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100106 Ubuntu/9.10 (karmic) Firefox/3.5.7
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100106 Ubuntu/9.10 (karmic) Firefox/3.5.7

I have a web app that allows you to select some items from a list and then press a 'do stuff' button. 
The list is refreshed every x minutes by means of a <meta> header. 

The problem is, in Firefox, if the refresh comes the form remembers the checkboxes that were ticket. Apparently it does so based on the order of the boxes of the form and not on the id or value of the boxes. 

Example: you have a list of fruit:
o Apples
o Bananas
o Oranges

You select Apples and Oranges. The refresh comes, it adds Grapes between Bananas and Oranges.
The expected behavior would be that Apples and Oranges stay selected.
The observed behavior is that Apples and Grapes are now selected.

The issue is of course that if you click the 'Do Stuff' button just before a refresh, or just in general are doing some research while making your selections, you might end up doing stuff on fruit you did not select.

Reproducible: Always

Steps to Reproduce:
1. go to the URL
2. Select bananas and lemons
3. Wait until the refresh comes

Actual Results:  
Some random other fruit, in the positions of the old fruit, is selected

Expected Results:  
the form is refreshed, but the same checkboxes for bananas and lemons stay selected.
Comment 1 Christian Davén 2011-02-08 05:19:24 PST
I can confirm that the bug is still there in 3.6.13 on Linux.
Comment 2 Greg Hendricks 2011-06-20 14:49:12 PDT
This is still a problem in firefox 4.01 
A good description of the result is found at

The result is that anytime javascript dynamically changes or updates an element with radio buttons, the "checked" attribute is ignored at least in the rendering.
Comment 3 Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2011-06-20 14:54:18 PDT
I'm mostly certain this has nothing to do with the form manager. I think this is actually related to how session history serializes the form state.

Note You need to log in before you can comment on or make changes to this bug.