Bug Tracker

Modify

Ticket #8060 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

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:
Blocking: Blocked by:

Description (last modified by timmywil) (diff)

In IE6 and IE7.  test case  failure pic

Change History

comment:1 Changed 3 years ago by jitter

  • Priority changed from undecided to low
  • Resolution set to worksforme
  • Status changed from new to closed
  • Component changed from unfiled to attributes

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.

comment:2 Changed 3 years ago by ajpiano

  • Status changed from closed to reopened
  • Resolution worksforme deleted

comment:3 follow-up: ↓ 4 Changed 3 years ago by ajpiano

  • Owner set to anonymous
  • Status changed from reopened to pending

comment:4 in reply to: ↑ 3 Changed 3 years ago by anonymous

  • Status changed from pending to new

Replying to ajpiano: will do tomorrow.

comment:5 Changed 3 years ago by Protorium

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 3 years ago by dmethvin

  • Priority changed from low to blocker
  • Status changed from new to open
  • Milestone changed from 1.next to 1.6

comment:7 Changed 3 years ago by john

  • Owner changed from anonymous to timmywil
  • Status changed from open to assigned

comment:8 Changed 3 years ago by timmywil

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 3 years ago by timmywil

  • Summary changed from $(":checkbox").attr("checked","checked");not effect under ie6 to Setting checked to true on a disconnected checkbox does not carry over after attaching to DOM.

comment:10 Changed 3 years ago by timmywil

  • Description modified (diff)

comment:11 Changed 3 years ago by timmywil

  • Version changed from 1.4.4 to 1.5.2
  • Component changed from attributes to manipulation

comment:12 Changed 3 years ago by timmywil

  • Status changed from assigned to closed
  • Resolution set to duplicate

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

comment:13 Changed 3 years ago by timmywil

Duplicate of #8500.

comment:14 Changed 3 years ago by timmywil

  • Status changed from closed to reopened
  • Resolution duplicate deleted

comment:15 Changed 3 years ago by timmywil

#8500 is a duplicate of this ticket.

comment:16 Changed 3 years ago by timmywil

  • Status changed from reopened to assigned

comment:17 Changed 3 years ago by gnarf

comment:18 Changed 3 years ago by timmywil

#8920 is a duplicate of this ticket.

comment:19 Changed 3 years ago by timmywil

  • Status changed from assigned to closed
  • Resolution set to fixed

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

More Details:

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.