Skip to main content

Bug Tracker

Side navigation

#10558 closed bug (fixed)

Opened October 22, 2011 01:19AM UTC

Closed October 24, 2011 03:50PM UTC

Last modified October 24, 2011 07:42PM UTC

Test Support bug

Reported by: zhengzongyi@gmail.com 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.

Attachments (0)
Change History (6)

Changed October 22, 2011 01:47AM UTC by dmethvin comment:1

owner: → zhengzongyi@gmail.com
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?

Changed October 22, 2011 01:53AM UTC by anonymous comment:2

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

Changed October 23, 2011 07:13PM UTC by dmethvin comment:3

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.

Changed October 24, 2011 03:50PM UTC by dmethvin comment:4

owner: zhengzongyi@gmail.comdmethvin
status: openassigned

Changed October 24, 2011 03:50PM UTC by dmethvin comment:5

resolution: → fixed
status: assignedclosed

Changed October 24, 2011 07:42PM UTC by anonymous comment:6

I think this is fixed.