Modify ↓
Ticket #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: | ||
| Blocking: | Blocked by: |
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
comment:1 Changed 19 months ago by dmethvin
- Owner set to zhengzongyi@…
- Status changed from new to pending
comment:2 Changed 19 months 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 19 months ago by dmethvin
- Priority changed from undecided to blocker
- Status changed from pending to open
- Version changed from 1.6.4 to 1.7b2
- Component changed from unfiled to support
- Milestone changed from None to 1.7
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 19 months ago by dmethvin
- Owner changed from zhengzongyi@… to dmethvin
- Status changed from open to assigned
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

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?