Bug Tracker

Ticket #7452 (closed bug: fixed)

Opened 4 years ago

Last modified 2 years ago

Next Adjacent/Sibling Selectors no longer work without "prev" element

Reported by: ambrauer Owned by: jitter
Priority: high Milestone: 1.5
Component: selector Version: 1.4.3
Keywords: sibling next previous Cc:
Blocking: Blocked by:

Description

Using the next selectors ( adjacent and  siblings) with a context or find no longer seems to be working in version 1.4.3+.

See an example in jsFiddle  here.

What's odd is that it still works for the  child selector which has a similar syntax.

Change History

comment:1 Changed 4 years ago by SlexAxton

  • Keywords sibling next previous added
  • Priority changed from undecided to low
  • Status changed from new to open
  • Component changed from unfiled to selector

This seems valid. Definitely a regression. (Though technically these are not valid qSA compatible selectors, which is why they've gotten a little wonky. If you just write out the full selector, like the 3rd example, it'll work just fine.)

comment:2 Changed 4 years ago by SlexAxton

#7463 is a duplicate of this ticket.

comment:3 Changed 4 years ago by jitter

#7682 is a duplicate of this ticket.

comment:4 Changed 4 years ago by jitter

  • Owner set to jitter
  • Priority changed from low to high
  • Status changed from open to assigned

This bug (as stated above) only affects the hierarchy-selectors next adjacent/siblings selectors (+/~) when used with a context but with no left hand side.

This bug is caused by changes for 1.4.3 to allow qSA to be used for Element-rooted queries too.

 test case
 test case
 Sizzle pull request

comment:5 Changed 4 years ago by john

  • Status changed from assigned to closed
  • Resolution set to fixed

Landed.

Note: See TracTickets for help on using tickets.