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
DUPEME
:
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
:
:
Mentors:
http://beefreeit.nl/cgi-bin/fruitform.pl
Depends on:
Blocks:
  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:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Michiel Beijen 2010-01-12 08:06:29 PST
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100106 Ubuntu/9.10 (karmic) Firefox/3.5.7
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) 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 http://beefreeit.nl/cgi-bin/fruitform.pl
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 http://www.ryancramer.com/journal/entries/radio_buttons_firefox/

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.