Side navigation
#11706 closed bug (fixed)
Opened May 05, 2012 05:15PM UTC
Closed May 10, 2012 03:44PM UTC
Last modified May 10, 2012 04:05PM UTC
`.has()` fails on document fragments
Reported by: | john.firebaugh | Owned by: | rwaldron |
---|---|---|---|
Priority: | low | Milestone: | 1.8 |
Component: | traversing | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
While :has
works correctly, .has()
returns an empty selection whenever the selection is a document fragment. Once the fragment is inserted in the document, it works as expected.
Test case:
$('<div><span></span></div>').has('span').length
Expected: 1
Actual: 0
Attachments (0)
Change History (6)
Changed May 07, 2012 04:21PM UTC by comment:1
owner: | → rwaldron |
---|---|
status: | new → assigned |
Changed May 07, 2012 04:28PM UTC by comment:2
resolution: | → worksforme |
---|---|
status: | assigned → closed |
This is not even possible, as we have unit tests that would catch such a regression.
Also, your test case doesn't support your claim.
Changed May 10, 2012 05:24AM UTC by comment:3
Sorry, what?
I just ran fiddle test case in Chrome 18, Firefox 12, and Safari 5.1. All failed.
Please reopen.
Changed May 10, 2012 12:50PM UTC by comment:4
resolution: | worksforme |
---|---|
status: | closed → reopened |
Confirmed from the fiddle.
Changed May 10, 2012 03:44PM UTC by comment:5
component: | unfiled → traversing |
---|---|
milestone: | None → 1.8 |
priority: | undecided → low |
resolution: | → fixed |
status: | reopened → closed |
This is working in master. rwaldron switched to jQuery edge before testing, which is why he didn't see the failure.
Changed May 10, 2012 04:05PM UTC by comment:6
Great, thank you for investigating.