Bug Tracker

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#10558 closed bug (fixed)

Test Support bug

Reported by: zhengzongyi@… Owned by: dmethvin
Priority: blocker Milestone: 1.7
Component: support Version: 1.7b2
Keywords: Cc:
Blocked by: Blocking:

Description

hi , when i read the jQuery's code, in line 1286. the jQuery append firstChild of div that is either a table or textNode, not a checkbox. but test its checked property in line 1289.

thanks.

Change History (6)

comment:1 Changed 6 years ago by dmethvin

Owner: set to zhengzongyi@…
Status: newpending

I think the code you are referring to is here in support.js:

input.setAttribute("checked", "checked");
div.appendChild( input );
fragment = document.createDocumentFragment();
fragment.appendChild( div.firstChild );

// WebKit doesn't clone checked state correctly in fragments
support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;

It looks correct to me; the fragment is being cloned and the only thing in the fragment is an input element. Can you provide more information, or better yet a test case that fails?

comment:2 Changed 6 years ago by anonymous

sorry, i can't provide more information. i debug the code, the "fragment.lastChild" isn't a input, it is a textNode or table.

comment:3 Changed 6 years ago by dmethvin

Component: unfiledsupport
Milestone: None1.7
Priority: undecidedblocker
Status: pendingopen
Version: 1.6.41.7b2

I agree, it seems like a bug. Thanks! I think the code should have appended div.lastChild which is an <input /> and not div.firstChild.

comment:4 Changed 6 years ago by dmethvin

Owner: changed from zhengzongyi@… to dmethvin
Status: openassigned

comment:5 Changed 6 years ago by dmethvin

Resolution: fixed
Status: assignedclosed

comment:6 Changed 6 years ago by anonymous

I think this is fixed.

Note: See TracTickets for help on using tickets.