#5414 closed bug (duplicate)
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)
Change History (11)
Changed 13 years ago by
Attachment: | Jquery-bug.html added |
---|
comment:1 Changed 13 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Seems to work now in 1.4.
comment:2 Changed 12 years ago by
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.
comment:3 Changed 12 years ago by
Milestone: | 1.4 |
---|---|
Resolution: | worksforme |
Status: | closed → reopened |
comment:4 Changed 12 years ago by
Component: | unfiled → selector |
---|---|
Milestone: | → 1.4.5 |
Priority: | major → high |
Status: | reopened → open |
Version: | 1.3.2 → 1.4.4 |
comment:5 Changed 12 years ago by
Version: | 1.4.4 → 1.5 |
---|
comment:8 Changed 12 years ago by
Note that :first-child
does work correctly. I would strongly warn people away from using jQuery positional selector extensions for events.
comment:9 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | open → closed |
Grouping these under a master ticket.
Example showing bug