Skip to main content

Bug Tracker

Side navigation

#8922 closed bug (invalid)

Opened April 19, 2011 09:27PM UTC

Closed April 19, 2011 09:41PM UTC

.attr("checked","") is setting value to checked

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

http://jsfiddle.net/3x562/

A blank string (or any string) is setting the value of the checkbox to checked. This seems to be a change in behavior from 1.5.2. Setting the value to false will correct the issue.

Attachments (0)
Change History (1)

Changed April 19, 2011 09:41PM UTC by timmywil comment:1

component: unfiledattributes
priority: undecidedlow
resolution: → invalid
status: newclosed

We no longer remove the attribute when an empty string is provided as that can be a valid use case for multiple boolean attributes, which leaves them as true in multiple browsers. To set to false, use .attr('checked', false) or preferably .removeAttr('checked').