Bug Tracker

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#212 closed (invalid)


Reported by: [email protected] Owned by:
Priority: Milestone:
Component: Version:
Keywords: Rhonda, SPAM Cc:
Blocked by: Blocking:


If I have document <div id=lst></div> then $(‘#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)

Change History (7)

comment:1 Changed 16 years ago by rob.brackett

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):[]".

comment:2 Changed 16 years ago by joern

Resolution: fixed
Status: newclosed

sibling() is fixed in SVN.

comment:3 Changed 16 years ago by substitute

Cc: "" added
Component: core
Milestone: 1.0
Priority: major
Resolution: fixed
Status: closedreopened
Type: bug

comment:4 Changed 16 years ago by joern

Component: ajax
Priority: blocker
Resolution: invalid
Status: reopenedclosed
Type: bug


comment:5 Changed 16 years ago by Rhonda

Cc: Rhonda added; "" removed
Component: ajax1
Keywords: Rhonda added; find subling removed
Milestone: 1
Priority: blocker1
Summary: $('node1/node2') gives error when node1 is emptyRhonda
Type: bug1
Version: 1

comment:6 Changed 12 years ago by snover

Component: 1
Milestone: 1
Priority: 1
Type: 1
Version: 1

comment:7 Changed 12 years ago by snover

Cc: Rhonda removed
Keywords: SPAM added
Note: See TracTickets for help on using tickets.