Skip to main content

Bug Tracker

Side navigation

#10864 closed bug (fixed)

Opened November 22, 2011 07:05PM UTC

Closed January 20, 2012 09:48PM UTC

Last modified March 13, 2012 03:15PM UTC

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:
Blocked by: Blocking:
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())
Attachments (0)
Change History (5)

Changed November 22, 2011 07:19PM UTC by rockhymas comment:1

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

Changed November 22, 2011 07:45PM UTC by timmywil comment:2

component: unfiledmanipulation
milestone: None1.7.2
priority: undecidedhigh
status: newopen

Changed January 16, 2012 05:24PM UTC by rwaldron comment:3

owner: → rwaldron
status: openassigned

Changed January 20, 2012 09:35PM UTC by rwaldron comment:4

priority: highblocker

Changed January 20, 2012 09:48PM UTC by Rick Waldron comment:5

resolution: → fixed
status: assignedclosed

Adds test to support Sizzle getText patch for document fragments. Fixes #10864.

Changeset: 499658970b2c9add7a7d175dffc8e263c3b7b50d