Closed
Bug 850151
Opened 12 years ago
Closed 10 years ago
select field: adding and removing fields causes bug
Categories
(Firefox :: Untriaged, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: prajwalkman, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.160 Safari/537.22
Steps to reproduce:
I have a UI for users to select custom fields that they need on their form. Essentially I have to multi-select fields(A and B), one containing the pool of all options, and the other containing the ones they need.
There is an add button and a remove button. When the user highlights some options in A and clicks "add", the highlighted options are, through jQuery, removed from A and appended to B, and vice versa for "remove".
When the form is submitted, we make sure all the options of B are selected using jQuery.attr method.
Actual results:
We developed this on Chrome, and it worked fine in all cases. But our clients use Firefox, and encountered a bug.
In only one of the use cases, something weird was happening:
Step 1: Highlight some options in A
Step 2: Click "Add". Highlighted options removed from A and appended to B
Step 3: Highlight some option (not all) in B, and click "Remove". Selected fields are moved from B to A.
Step 4: Submit. This is where Chrome works without issue, but Firefox causes problems. Firefox fails to highlight any of the new fields in B, and as a result no new fields are added, i.e., it only highlights the fields that were already there.
Expected results:
On submit, all the options on the select field should have been highlighted.
| Reporter | ||
Updated•12 years ago
|
Summary: select field add remove → select field: adding and removing fields causes bug
| Reporter | ||
Comment 1•12 years ago
|
||
FYI, the jQuery we use goes like this:
$("#selectable_fields option:selected").remove().appendTo("#selected_fields")
From my (amateur) understanding, Firefox attaches something to each option object that makes it keep a reference to its original select field even when it is moved around like above, and not obey commands from its new select field.
Attach a simple testcase to the bug, please.
Flags: needinfo?(prajwalkman)
Keywords: testcase-wanted
Comment 3•12 years ago
|
||
as for comment 2 prajwalkman could you provide a simple testcase to better understand and try to reproduce this?
Comment 4•10 years ago
|
||
Closing this as incomplete due to inactivity and the lack of a reproducible test case. Feel free to reopen the bug if there's a testcase that still reproduces the issue.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Flags: needinfo?(prajwalkman)
Keywords: testcase-wanted
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•