Side navigation
#4193 closed bug (wontfix)
Opened February 19, 2009 02:42PM UTC
Closed March 17, 2009 10:55PM UTC
.clone() selected items lose select in FF but not in IE
Reported by: | lhwparis | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.3.2 |
Component: | core | Version: | 1.3.1 |
Keywords: | clone select option | Cc: | |
Blocked by: | Blocking: |
Description
when i clone one or more selected <option> from one <select> to
another there are differences between IE and firefox.
in IE the cloned element (in the second <select>) stays selected.
in firefox the cloned element is not selected.
so which one is correct?
the code:
$('#myselect option:selected').clone().appendTo($('#myselect2'));
Attachments (0)
Change History (4)
Changed February 19, 2009 11:47PM UTC by comment:1
summary: | .clone() selected items loose select in FF but not in IE → .clone() selected items lose select in FF but not in IE |
---|
Changed February 19, 2009 11:49PM UTC by comment:2
This is probably related to #2941 but isn't the same issue.
Changed February 19, 2009 11:49PM UTC by comment:3
keywords: | → clone select option |
---|
Changed March 17, 2009 10:55PM UTC by comment:4
resolution: | → wontfix |
---|---|
status: | new → closed |
This was at one time in core but was removed due to the large performance overhead for such an edge case. I'm not convinced that the values should be cloned with the form elements. To really make it work cross browser you'd have to change the name attributes and ids as well. I remember having issues with radio buttons in Opera where even though it was in a different form only one could be checked. Either the original or the clone.