Bug Tracker

Opened 14 years ago

Last modified 13 years ago

#3137 closed bug

Complex selectors breaking .parents() method — at Initial Version

Reported by: eduardo Owned by:
Priority: major Milestone: 1.3
Component: selector Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:


If you try to do:

$('body').parents('#fakeId div');

this query should returns 0 elements, but this returns the <html> node.

I found probably a bug on multiFilter method on core, the regex is breaking some selectors.

old regex: expr = f.t.replace(/\s*,\s*/, "" );

fix for this bug: expr = f.t.replace(/\s*,?\s*/, "" );

I write a selector test case, and after this change all selectors has passed.

Anyone can confirm is it okay?

Change History (2)

Changed 14 years ago by eduardo

Attachment: selectors.html added

Changed 14 years ago by eduardo

Attachment: selectors.js added
Note: See TracTickets for help on using tickets.