#8060 closed bug (fixed)
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: |
Description (last modified by )
In IE6 and IE7. test case failure pic
Change History (19)
comment:1 Changed 12 years ago by
Component: | unfiled → attributes |
---|---|
Priority: | undecided → low |
Resolution: | → worksforme |
Status: | new → closed |
comment:2 Changed 12 years ago by
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
comment:3 follow-up: 4 Changed 12 years ago by
Owner: | set to anonymous |
---|---|
Status: | reopened → pending |
comment:5 Changed 12 years ago by
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... http://jsfiddle.net/protoriumatwork/MwtCW/4/
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?
comment:6 Changed 12 years ago by
Milestone: | 1.next → 1.6 |
---|---|
Priority: | low → blocker |
Status: | new → open |
comment:7 Changed 12 years ago by
Owner: | changed from anonymous to timmywil |
---|---|
Status: | open → assigned |
comment:8 Changed 12 years ago by
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
comment:9 Changed 12 years ago by
Summary: | $(":checkbox").attr("checked","checked");not effect under ie6 → Setting checked to true on a disconnected checkbox does not carry over after attaching to DOM. |
---|
comment:10 Changed 12 years ago by
Description: | modified (diff) |
---|
comment:11 Changed 12 years ago by
Component: | attributes → manipulation |
---|---|
Version: | 1.4.4 → 1.5.2 |
comment:12 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
Gnarf's upcoming patch for #8500 addresses this same issue.
comment:14 Changed 12 years ago by
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
comment:19 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
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 http://jsfiddle.net which reproduces your issue.