Bug Tracker

Opened 11 years ago

Closed 11 years ago

#4437 closed bug (invalid)

Bug with IE6: removing a selected attribute raise an error

Reported by: cowa Owned by:
Priority: minor Milestone: 1.4
Component: core Version: 1.3.2
Keywords: ie6, removeattr Cc:
Blocked by: Blocking:

Description

Hello, my HTML page contains 3 select lists. 1- 1 list containing all the values 2- 1 list showing the selected values 3- 1 list showing the availables values

Double clicking on the 3rd list removes the corresponding value from the 3rd list and adds it from the 2nd and selects it in the 1st. Double clicking on the 2nd list returns it to the 3rd and deselects it in the 1st.

When double clicking on a value, I get an error in IE6 that I caught with a try/catch in xform-common.js line 49 at the instruction $(this).removeAttr("selected"); Please see the attached sources.

The same code works fine with Firefox 2.

Thanks in advance for the resolution.

Attachments (1)

local.zip (35.7 KB) - added by cowa 11 years ago.

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by cowa

Attachment: local.zip added

comment:1 Changed 11 years ago by dmethvin

That code is outside jQuery. Please reduce this to a test case that shows the problem lies within jQuery. Also, the "selected" attribute is also a "selected" property, that may be causing the issue you are seeing with IE.

comment:2 Changed 11 years ago by dmethvin

Resolution: invalid
Status: newclosed

When changing the "selected" state of an option via jQuery, use $().attr("selected", true) or $().attr("selected", false).

Note: See TracTickets for help on using tickets.