Bug Tracker

Modify

Ticket #4437 (closed bug: invalid)

Opened 4 years ago

Last modified 4 years ago

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:
Blocking: Blocked by:

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

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

Change History

Changed 4 years ago by cowa

comment:1 Changed 4 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 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.