Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#9130 closed bug (worksforme)

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 (last modified by timmywil)

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.

Change History (3)

comment:1 Changed 12 years ago by timmywil

Component: unfiledattributes
Description: modified (diff)
Owner: set to 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.

comment:2 Changed 12 years ago by addyosmani

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.

comment:3 Changed 12 years ago by anonymous

I also like that, looking forward to your feedback

Note: See TracTickets for help on using tickets.