Skip to main content

Bug Tracker

Side navigation

#5414 closed bug (duplicate)

Opened October 28, 2009 08:42AM UTC

Closed August 15, 2011 10:22PM UTC

Last modified August 15, 2011 10:22PM UTC

Live event binding not matching selector

Reported by: CarSandwich Owned by:
Priority: high Milestone: 1.next
Component: selector Version: 1.5
Keywords: live selector Cc:
Blocked by: Blocking:
Description

When using this selector with the live() it will incorrectly bind to all tr's on a page.

$('#ExampleTable tbody tr:not(:first)').live("dblclick", RowEvent);

I have attached an example of the bug.

It highlights the items the live event should bind to, yet clicking any tr on any table on the page fires the live event.

Attachments (1)
  • Jquery-bug.html (2.7 KB) - added by CarSandwich October 28, 2009 08:43AM UTC.

    Example showing bug

Change History (10)

Changed June 13, 2010 06:12PM UTC by dmethvin comment:1

resolution: → worksforme
status: newclosed

Seems to work now in 1.4.

Changed November 26, 2010 04:15AM UTC by anonymous comment:2

Still broken.

Here is the same example in JsFiddle.

http://jsfiddle.net/VtdQH/

Observe the rows are highlighted correctly, however the double click live event is still bound to all tr's on the page.

Eg you can double click any of the cheeses or the first beer, they are not part of the rows filter and should not be bound.

Changed November 26, 2010 08:40AM UTC by jitter comment:3

milestone: 1.4
resolution: worksforme
status: closedreopened

Changed November 26, 2010 08:42AM UTC by jitter comment:4

component: unfiledselector
milestone: → 1.4.5
priority: majorhigh
status: reopenedopen
version: 1.3.21.4.4

test case

The underlying issue seems to be with the is() check

test case for is()

Changed February 10, 2011 04:38PM UTC by jitter comment:5

version: 1.4.41.5

Changed February 10, 2011 04:38PM UTC by jitter comment:6

#8236 is a duplicate of this ticket.

Changed July 11, 2011 08:09PM UTC by dmethvin comment:7

Triaged as valid, but will need to wait for some Sizzle love.

Changed July 13, 2011 01:52PM UTC by dmethvin comment:8

Note that :first-child does work correctly. I would strongly warn people away from using jQuery positional selector extensions for events.

Changed August 15, 2011 10:22PM UTC by dmethvin comment:9

resolution: → duplicate
status: openclosed

Grouping these under a master ticket.

Changed August 15, 2011 10:22PM UTC by dmethvin comment:10

Duplicate of #9810.