Skip to main content

Bug Tracker

Side navigation

#8060 closed bug (fixed)

Opened January 26, 2011 05:35AM UTC

Closed April 22, 2011 01:56AM UTC

Last modified March 13, 2012 01:55PM UTC

Setting checked to true on a disconnected checkbox does not carry over after attaching to DOM.

Reported by: anonymous Owned by: timmywil
Priority: blocker Milestone: 1.6
Component: manipulation Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:

In IE6 and IE7.

test case

failure pic

Attachments (0)
Change History (19)

Changed January 26, 2011 12:28PM UTC by jitter comment:1

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

Thanks for taking the time to contribute to the jQuery project by writing a bug report.

I made this quick test case but can't seem to reproduce your problem in IE6.

Please report back if you can provide a reduced test case on which reproduces your issue.

Changed February 28, 2011 10:43PM UTC by ajpiano comment:2

resolution: worksforme
status: closedreopened

Changed February 28, 2011 10:45PM UTC by ajpiano comment:3

owner: → anonymous
status: reopenedpending

Changed March 01, 2011 12:27AM UTC by anonymous comment:4

status: pendingnew

Replying to [comment:3 ajpiano]: will do tomorrow.

Changed March 01, 2011 12:13PM UTC by Protorium comment:5

Ticket #8060 (closed bug: worksforme)

Opened 5 weeks ago

Last modified 5 weeks ago

$(":checkbox").attr("checked","checked");not effect under ie6

I can reproduce a scenario where the above is true... i.e. doesn't check in IE6.0 when does in FF/Safari/IE7/8.

Create an object and try .attr( "checked", true ); before adding the item to an item already in the document.

For example...

My guess is IE6 isn't happy until the object you are modifying actually exists in the document and can be obtained using document.getElementById... This isn't a major issue and may be using jQuery as it was not intended, but if jquery combined with other popular browsers allows this then shouldnt jQuery and IE 6.0?

Changed March 30, 2011 06:43PM UTC by dmethvin comment:6

milestone: 1.next1.6
priority: lowblocker
status: newopen

Changed March 30, 2011 06:47PM UTC by john comment:7

owner: anonymoustimmywil
status: openassigned

Changed April 01, 2011 02:46AM UTC by timmywil comment:8

I'm starting to think this is not an issue with attr, but an issue encountered somewhere between setting the attribute and appending it to the DOM. Before appending, the attribute is set correctly. After appending, it is no longer set. updated test case pic of ie6 and ie7 failure

Changed April 01, 2011 02:48AM UTC by timmywil comment:9

summary: $(":checkbox").attr("checked","checked");not effect under ie6Setting checked to true on a disconnected checkbox does not carry over after attaching to DOM.

Changed April 01, 2011 02:51AM UTC by timmywil comment:10

description: $(":checkbox").attr("checked","checked");not effect under ie6In IE6 and IE7. \ [ test case] \ [ failure pic]

Changed April 02, 2011 02:00AM UTC by timmywil comment:11

component: attributesmanipulation

Changed April 15, 2011 04:42AM UTC by timmywil comment:12

resolution: → duplicate
status: assignedclosed

Gnarf's upcoming patch for #8500 addresses this same issue.

Changed April 15, 2011 04:42AM UTC by timmywil comment:13

Duplicate of #8500.

Changed April 17, 2011 01:39AM UTC by timmywil comment:14

resolution: duplicate
status: closedreopened

Changed April 17, 2011 01:39AM UTC by timmywil comment:15

#8500 is a duplicate of this ticket.

Changed April 17, 2011 05:20AM UTC by timmywil comment:16

status: reopenedassigned

Changed April 17, 2011 07:37AM UTC by gnarf comment:17

Also a jQuery UI bug:

Changed April 19, 2011 06:59PM UTC by timmywil comment:18

#8920 is a duplicate of this ticket.

Changed April 22, 2011 01:56AM UTC by timmywil comment:19

resolution: → fixed
status: assignedclosed

Landing pull request 332. Appending disconnected radio or checkbox inputs and keeping checked setting Fixes #8060, #8500.

More Details:

Changeset: d274b7b9f7727e8bccd6906d954e4dc790404d23