Ticket #8610 (closed bug: worksforme)
FireFox 4 serializeArray() duplicate values
| Reported by: | anonymous | Owned by: | anonymous |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.next |
| Component: | attributes | Version: | 1.5.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
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);
Change History
comment:2 Changed 2 years ago by anonymous
- Status changed from pending to new
I have noticed this happening as well, but have a difficult time reproducing it. It seems to happen sporadically
comment:3 Changed 2 years ago by rwaldron
- Status changed from new to closed
- Resolution set to worksforme
- Component changed from unfiled to attributes
Cannot be reproduced...
comment:4 Changed 2 years ago by anonymous
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 ...
comment:5 follow-up: ↓ 6 Changed 2 years ago by 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
comment:6 in reply to: ↑ 5 Changed 2 years ago by anonymous
Replying to 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.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Can you provide a working test case in jsFiddle please?