Bug Tracker

Opened 11 years ago

Closed 8 years ago

#4658 closed bug (worksforme)

checked checkboxes array bug in ie8

Reported by: anil.konsal Owned by: john
Priority: major Milestone: 1.next
Component: selector Version: 1.3.2
Keywords: ie8 checkbox Cc:
Blocked by: Blocking:

Description

$("input[type=checkbox][checked]").length always returns 0 in ie8, but the same works fine in FF3. Pls check.

Attachments (2)

test-4658.html (1.2 KB) - added by dmethvin 11 years ago.
test case
xp-ie8#4658.PNG (5.0 KB) - added by dmethvin 11 years ago.
appearance in IE8 on XP SP2

Download all attachments as: .zip

Change History (7)

comment:1 Changed 11 years ago by dmethvin

Keywords: ie8 checkbox added

I have attached an HTML file that tries several different permutations of checkboxes with different checked states. Some are set by virtue of an attribute; others are set by code. The test case is attached.

In IE8 on XP SP2, it looks like the attached screen shot. All the elements that had a checked *attribute* continue to be sensed as checked by IE8, and the one element that was originally unchecked isn't detected despite having its checked *property* set before the selector was run. If the checked attribute is removed using .removeAttr() the selector doesn't find it as expected.

This looks like a Sizzle issue so I've reassigned it there.

Changed 11 years ago by dmethvin

Attachment: test-4658.html added

test case

Changed 11 years ago by dmethvin

Attachment: xp-ie8#4658.PNG added

appearance in IE8 on XP SP2

comment:2 Changed 11 years ago by dmethvin

Component: coreselector
Owner: set to john

Also, IE8 version 8.0.6001.18702.

comment:3 Changed 9 years ago by dmethvin

Milestone: 1.4
Status: newopen

http://jsfiddle.net/dmethvin/wDbtn/

jsfiddle update of the attached test case. Basically, the .attr() results and dynamic .checked *property* seem to be accurate on all platforms but the *attribute* is not always updated.

comment:4 Changed 9 years ago by danheberden

Milestone: 1.next

comment:5 Changed 8 years ago by john

Resolution: worksforme
Status: openclosed

This has been fixed in jQuery 1.6.

Note: See TracTickets for help on using tickets.