Bug Tracker

Ticket #10535 (closed bug: duplicate)

Opened 3 years ago

Last modified 3 years ago

Sizzle filter function

Reported by: zsinryu@… Owned by:
Priority: low Milestone: None
Component: traversing Version: 1.6.4
Keywords: Cc:
Blocking: Blocked by:

Description

I found something wrong.

for ex: <ul>

<li></li> <li></li> <li></li> <li></li>

</ul>

The query: $('ul:first li:last').filter('ul:first li:first')

return as $('ul:first li:last')

This problem cause: $('ul:first li:last').is('ul:first li:first') return true and many other functions using 'is' function will not be correct.

Please investigate this problem

Change History

comment:1 Changed 3 years ago by timmywil

  • Priority changed from undecided to low
  • Resolution set to duplicate
  • Status changed from new to closed
  • Component changed from unfiled to traversing

We encountered this logical problem recently in the event rewrite in 1.7. It has been addressed and it was decided that .is will be treated slightly differently than .filter. .is will take into account positional selectors such as first and check against the original relationships.

comment:2 Changed 3 years ago by timmywil

Duplicate of #7322.

Note: See TracTickets for help on using tickets.