Bug Tracker

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#7452 closed bug (fixed)

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:
Blocked by: Blocking:


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 (5)

comment:1 Changed 6 years ago by SlexAxton

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

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 6 years ago by SlexAxton

#7463 is a duplicate of this ticket.

comment:3 Changed 6 years ago by jitter

#7682 is a duplicate of this ticket.

comment:4 Changed 6 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 6 years ago by john

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


Note: See TracTickets for help on using tickets.