Skip to main content

Bug Tracker

Side navigation

#8610 closed bug (worksforme)

Opened March 23, 2011 02:43PM UTC

Closed March 24, 2011 04:11PM UTC

Last modified March 29, 2011 05:16PM UTC

FireFox 4 serializeArray() duplicate values

Reported by: anonymous Owned by: anonymous
Priority: undecided Milestone: 1.next
Component: attributes Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:
Description

In FireFox 4 (ONLY) serializeArray() is duplicating all the form entries.

code:

var str = "";

$.each($('#element_id *'), function (i, o) {

str += o.name + "=" + o.value + "|";

});

alert(str);

Attachments (0)
Change History (6)

Changed March 24, 2011 02:51PM UTC by dmethvin comment:1

owner: → anonymous
status: newpending

Can you provide a working test case in jsFiddle please?

Changed March 24, 2011 04:05PM UTC by anonymous comment:2

status: pendingnew

I have noticed this happening as well, but have a difficult time reproducing it. It seems to happen sporadically

http://jsfiddle.net/QEaav/1/

Changed March 24, 2011 04:11PM UTC by rwaldron comment:3

component: unfiledattributes
resolution: → worksforme
status: newclosed

Cannot be reproduced...

http://jsfiddle.net/rwaldron/QEaav/3/

Changed March 24, 2011 05:06PM UTC by anonymous comment:4

This is happening on my website every time on Firefox 4 only. I've tried to reproduce on jsFiddle but it works fine in there.

Maybe it is affected by some plugin or something. I will investigate it ...

Changed March 25, 2011 04:09PM UTC by anonymous comment:5

Figured out my issue, with the help of a co-worker, I was improperly selecting elements to get what I needed I was doing a $foms.find(':visible'), this was getting elements that I did not expect. changing it to a .filter(':visible') fixed the issue

Changed March 29, 2011 05:16PM UTC by anonymous comment:6

Replying to [comment:5 anonymous]:

Figured out my issue, with the help of a co-worker, I was improperly selecting elements to get what I needed I was doing a $foms.find(':visible'), this was getting elements that I did not expect. changing it to a .filter(':visible') fixed the issue

The way I select the elements is: $('#element_id *') where "element_id" is the form container. But the funny thing is that is working on jsFiddle.