Modify ↓
Ticket #10864 (closed bug: fixed)
text() method on a document fragment always returns the empty string
| Reported by: | rockhymas | Owned by: | rwaldron |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.7.2 |
| Component: | manipulation | Version: | 1.7 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
The following code used to work in 1.6.x, but no longer does (1.7 or 1.7.1) See http://jsfiddle.net/9UcdC/ for repro. Just change the jquery version to 1.6 to see that it used to work.
frag = document.createDocumentFragment();
frag.appendChild(document.createTextNode('Always two there are'));
alert($(frag).text())
Change History
comment:2 Changed 18 months ago by timmywil
- Priority changed from undecided to high
- Status changed from new to open
- Component changed from unfiled to manipulation
- Milestone changed from None to 1.7.2
comment:3 Changed 16 months ago by rwaldron
- Owner set to rwaldron
- Status changed from open to assigned
comment:4 Changed 16 months ago by rwaldron
- Priority changed from high to blocker
Supporting tests: https://github.com/jquery/jquery/pull/661
comment:5 Changed 16 months ago by Rick Waldron
- Status changed from assigned to closed
- Resolution set to fixed
Adds test to support Sizzle getText patch for document fragments. Fixes #10864.
Changeset: 499658970b2c9add7a7d175dffc8e263c3b7b50d
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.

Submitted pull request with fix at https://github.com/jquery/sizzle/pull/84