Skip to main content

Bug Tracker

Side navigation

#12545 closed bug (invalid)

Opened September 16, 2012 08:20AM UTC

Closed October 02, 2012 09:10AM UTC

.on() not working with selector path starting at selected element on v1.8.1

Reported by: fox_rgwxox@Rcpt.at Owned by: fox_rgwxox@Rcpt.at
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.1
Keywords: Cc:
Blocked by: Blocking:
Description

On version 1.8.1, $(element).on(event,selector,fn) isn't working when the selector path is starting at the same level or at a higher level than element path.

This was working on version 1.8.0

1.8.1 (not working) http://jsfiddle.net/TxsmH/

1.8.0 (working) http://jsfiddle.net/TxsmH/2/

Attachments (0)
Change History (2)

Changed September 17, 2012 11:46PM UTC by dmethvin comment:1

owner: → fox_rgwxox@Rcpt.at
status: newpending

This was actually an intended change, but I agree it needs to be documented. Non-positional selectors in delegated events were the only place where the selector "looked up" when trying to do a match. The case you have there is actually very unusual because it should have "#b" and there's no need for "#a #b". In general, if you attach a delegated event at or below a particular element there is no need to check that it is a descendant of that element.

I hope that explains why the change was made...can you adjust your selectors?

Changed October 02, 2012 09:10AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!