Skip to main content

Bug Tracker

Side navigation

#9130 closed bug (worksforme)

Opened May 05, 2011 05:14PM UTC

Closed May 06, 2011 05:04AM UTC

Last modified May 09, 2011 03:10AM UTC

In the 1.6 release, checkbox operation error

Reported by: tester Owned by: tester
Priority: low Milestone: 1.next
Component: attributes Version: 1.6
Keywords: Cc:
Blocked by: Blocking:
Description

In IE9, $ ("#checkBox1"). Attr ('checked') is the value of, other mainstream browsers did not return the correct value, tested the Firefox,Chrome,Opera, are disabled, but old version 1.3.2 you properly under any browser.

Attachments (0)
Change History (3)

Changed May 05, 2011 05:16PM UTC by timmywil comment:1

component: unfiledattributes
description: \ In IE9, $ ("#checkBox1"). Attr ('checked') is the value of, other mainstream browsers did not return the correct value, tested the Firefox,Chrome,Opera, are disabled, but old version 1.3.2 you properly under any browser.In IE9, $ ("#checkBox1"). Attr ('checked') is the value of, other mainstream browsers did not return the correct value, tested the Firefox,Chrome,Opera, are disabled, but old version 1.3.2 you properly under any browser.
owner: → tester
priority: undecidedlow
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on http://jsfiddle.net that reproduces the issue experienced to help us assess your ticket!

Additionally, test against the jQuery (edge) version to ensure the issue still exists.

Changed May 06, 2011 05:04AM UTC by addyosmani comment:2

resolution: → worksforme
status: pendingclosed

I've put together a test-case here http://jsfiddle.net/9Wyy8/1/ that's been tested in latest Firefox, Chrome, Opera and IE9 using our current edge version. The value of $("#checkBox1").attr('checked') is consistent for me across all browsers (and returns the values we expect).

Just a few notes:

  • Changes have been made to .attr() since the 1.6 release was pushed and the behavior you experience in our current edge version vs. 1.6 differs
  • jQuery 1.6 came with a change to the way attr('checkbox') would work. See below for a quote from our release notes:

''Before jQuery 1.6, .attr("checked") returned the Boolean property value (true) but as of jQuery 1.6 it returns the actual value of the attribute (an empty string), which doesn’t change when the user clicks the checkbox to change its state.''

Changed May 09, 2011 03:10AM UTC by anonymous comment:3

I also like that, looking forward to your feedback