Skip to main content

Bug Tracker

Side navigation

#4658 closed bug (worksforme)

Opened May 14, 2009 09:26AM UTC

Closed July 11, 2011 07:12PM UTC

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 May 14, 2009 11:46PM UTC.

    test case

  • xp-ie8#4658.PNG (5.0 KB) - added by dmethvin May 14, 2009 11:47PM UTC.

    appearance in IE8 on XP SP2

Change History (5)

Changed May 14, 2009 11:46PM UTC by dmethvin comment:1

keywords: → ie8 checkbox

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 May 14, 2009 11:51PM UTC by dmethvin comment:2

component: coreselector
owner: → john

Also, IE8 version 8.0.6001.18702.

Changed November 17, 2010 03:28AM UTC by dmethvin comment:3

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.

Changed March 31, 2011 04:50AM UTC by danheberden comment:4

milestone: → 1.next

Changed July 11, 2011 07:12PM UTC by john comment:5

resolution: → worksforme
status: openclosed

This has been fixed in jQuery 1.6.