Skip to main content

Bug Tracker

Side navigation

#212 closed (invalid)

Opened September 25, 2006 05:02PM UTC

Closed October 26, 2006 02:19PM UTC

Last modified November 08, 2006 12:55PM UTC


Reported by: Owned by:
Priority: Milestone:
Component: Version:
Keywords: Rhonda,SPAM Cc:
Blocked by: Blocking:

If I have document

<div id=lst></div>


$(‘#lst/div’).length gives error, but $(‘#lst’).find(‘div’).length gives 0

Rev: 249 Date: 2006-08-31 13:26:31 -0400 (Thu, 31 Aug 2006)

Attachments (0)
Change History (7)

Changed September 25, 2006 05:25PM UTC by rob.brackett comment:1

The same problem also occurs with "#lst > div". This seems to be because the method for evaluating the ">" and "/" tokens sends #lst's firstChild to jQuery.sibling(), which then tries to get its parentNode. Boom! Null element reference doesn't have a parentNode! It can probably be fixed by

A) making jQuery.sibling() check for a null value for its 'elem' argument or

B) changing jQuery.token[3] to something like "a.firstChild?jQuery.sibling(a.firstChild):[]".

Changed October 06, 2006 02:33PM UTC by joern comment:2

resolution: → fixed
status: newclosed

sibling() is fixed in SVN.

Changed October 26, 2006 12:35PM UTC by substitute comment:3

cc: → ""
component: core
milestone: 1.0
priority: major
resolution: fixed
status: closedreopened
type: bug

Changed October 26, 2006 02:19PM UTC by joern comment:4

component: → ajax
priority: → blocker
resolution: → invalid
status: reopenedclosed
type: → bug


Changed November 08, 2006 12:55PM UTC by Rhonda comment:5

cc: ""Rhonda
component: ajax1
keywords: find sublingRhonda
milestone: → 1
priority: blocker1
summary: $('node1/node2') gives error when node1 is emptyRhonda
type: bug1
version: → 1

Changed October 24, 2010 09:22PM UTC by snover comment:6

component: 1
milestone: 1
priority: 1
type: 1
version: 1

Changed October 24, 2010 09:28PM UTC by snover comment:7

cc: Rhonda
keywords: RhondaRhonda,SPAM