Skip to main content

Bug Tracker

Side navigation

#6386 closed enhancement (fixed)

Opened April 01, 2010 05:42PM UTC

Closed September 20, 2011 12:55PM UTC

support data argument for live events via "event.special.live.add"

Reported by: mike.helgeson Owned by: dmethvin
Priority: low Milestone: 1.7
Component: event Version: 1.4.4
Keywords: live,1.7-discuss Cc:
Blocked by: Blocking:
Description

I am attempting to support "live" events in a custom special event, and the data object passed in the "bind" method gets passed into my special event "setup" function. This allows accepting that argument as options. This does not work with the "live" method. The "data" property is correctly set in the "live" handler "event" object, but not passed into my special event "setup" function.

It is a very small change indeed. On line 2029 of jQuery 1.4.2,in the "jQuery.event.special.live.add" function, simply add the "handleObj.data" property as the fourth argument to "jQuery.event.add". Alternatively, this could be handled within the "jQuery.event.add" method.

As a side note. I think the "liveHandler" and "liveConvert" methods, which are currently private, should be moved to the "jQuery.event.special.live" object. This would allow plugins to leverage more of the "live" features for development. I would also be able to patch the previously mentioned issue within my special event plugin, but I cannot because "liveHandler" is private.

Attachments (0)
Change History (14)

Changed November 12, 2010 02:40AM UTC by snover comment:1

milestone: 1.4.3

Resetting milestone to future.

Changed November 21, 2010 02:23AM UTC by snover comment:2

milestone: → 1.5
priority: → low
status: newopen
summary: "event.special.live.add" does not pass data argument to "event.add"support data argument for live events via "event.special.live.add"
type: bugenhancement
version: 1.4.21.4.4

If you provide a patch on GitHub, that will help to get this issue resolved more quickly.

Changed April 17, 2011 12:28AM UTC by john comment:3

milestone: → 1.next

Let's look at this for 1.7.

Changed May 22, 2011 07:27PM UTC by john comment:4

keywords: livelive,1.7-discuss

Nominating ticket for 1.7 discussion.

Changed May 22, 2011 10:11PM UTC by rwaldron comment:5

description: I am attempting to support "live" events in a custom special event, and the data object passed in the "bind" method gets passed into my special event "setup" function. This allows accepting that argument as options. This does not work with the "live" method. The "data" property is correctly set in the "live" handler "event" object, but not passed into my special event "setup" function. \ \ It is a very small change indeed. On line 2029 of jQuery 1.4.2,in the "jQuery.event.special.live.add" function, simply add the "handleObj.data" property as the fourth argument to "jQuery.event.add". Alternatively, this could be handled within the "jQuery.event.add" method. \ \ As a side note. I think the "liveHandler" and "liveConvert" methods, which are currently private, should be moved to the "jQuery.event.special.live" object. This would allow plugins to leverage more of the "live" features for development. I would also be able to patch the previously mentioned issue within my special event plugin, but I cannot because "liveHandler" is private.I am attempting to support "live" events in a custom special event, and the data object passed in the "bind" method gets passed into my special event "setup" function. This allows accepting that argument as options. This does not work with the "live" method. The "data" property is correctly set in the "live" handler "event" object, but not passed into my special event "setup" function.\ \ It is a very small change indeed. On line 2029 of jQuery 1.4.2,in the "jQuery.event.special.live.add" function, simply add the "handleObj.data" property as the fourth argument to "jQuery.event.add". Alternatively, this could be handled within the "jQuery.event.add" method.\ \ As a side note. I think the "liveHandler" and "liveConvert" methods, which are currently private, should be moved to the "jQuery.event.special.live" object. This would allow plugins to leverage more of the "live" features for development. I would also be able to patch the previously mentioned issue within my special event plugin, but I cannot because "liveHandler" is private.

+1,

Changed May 23, 2011 12:00AM UTC by jaubourg comment:6

+0,

Changed May 23, 2011 01:57AM UTC by ajpiano comment:7

description: I am attempting to support "live" events in a custom special event, and the data object passed in the "bind" method gets passed into my special event "setup" function. This allows accepting that argument as options. This does not work with the "live" method. The "data" property is correctly set in the "live" handler "event" object, but not passed into my special event "setup" function.\ \ It is a very small change indeed. On line 2029 of jQuery 1.4.2,in the "jQuery.event.special.live.add" function, simply add the "handleObj.data" property as the fourth argument to "jQuery.event.add". Alternatively, this could be handled within the "jQuery.event.add" method.\ \ As a side note. I think the "liveHandler" and "liveConvert" methods, which are currently private, should be moved to the "jQuery.event.special.live" object. This would allow plugins to leverage more of the "live" features for development. I would also be able to patch the previously mentioned issue within my special event plugin, but I cannot because "liveHandler" is private.I am attempting to support "live" events in a custom special event, and the data object passed in the "bind" method gets passed into my special event "setup" function. This allows accepting that argument as options. This does not work with the "live" method. The "data" property is correctly set in the "live" handler "event" object, but not passed into my special event "setup" function. \ \ It is a very small change indeed. On line 2029 of jQuery 1.4.2,in the "jQuery.event.special.live.add" function, simply add the "handleObj.data" property as the fourth argument to "jQuery.event.add". Alternatively, this could be handled within the "jQuery.event.add" method. \ \ As a side note. I think the "liveHandler" and "liveConvert" methods, which are currently private, should be moved to the "jQuery.event.special.live" object. This would allow plugins to leverage more of the "live" features for development. I would also be able to patch the previously mentioned issue within my special event plugin, but I cannot because "liveHandler" is private.

+1,

Changed May 23, 2011 03:13AM UTC by timmywil comment:8

description: I am attempting to support "live" events in a custom special event, and the data object passed in the "bind" method gets passed into my special event "setup" function. This allows accepting that argument as options. This does not work with the "live" method. The "data" property is correctly set in the "live" handler "event" object, but not passed into my special event "setup" function. \ \ It is a very small change indeed. On line 2029 of jQuery 1.4.2,in the "jQuery.event.special.live.add" function, simply add the "handleObj.data" property as the fourth argument to "jQuery.event.add". Alternatively, this could be handled within the "jQuery.event.add" method. \ \ As a side note. I think the "liveHandler" and "liveConvert" methods, which are currently private, should be moved to the "jQuery.event.special.live" object. This would allow plugins to leverage more of the "live" features for development. I would also be able to patch the previously mentioned issue within my special event plugin, but I cannot because "liveHandler" is private.I am attempting to support "live" events in a custom special event, and the data object passed in the "bind" method gets passed into my special event "setup" function. This allows accepting that argument as options. This does not work with the "live" method. The "data" property is correctly set in the "live" handler "event" object, but not passed into my special event "setup" function.\ \ It is a very small change indeed. On line 2029 of jQuery 1.4.2,in the "jQuery.event.special.live.add" function, simply add the "handleObj.data" property as the fourth argument to "jQuery.event.add". Alternatively, this could be handled within the "jQuery.event.add" method.\ \ As a side note. I think the "liveHandler" and "liveConvert" methods, which are currently private, should be moved to the "jQuery.event.special.live" object. This would allow plugins to leverage more of the "live" features for development. I would also be able to patch the previously mentioned issue within my special event plugin, but I cannot because "liveHandler" is private.

+1,

Changed May 23, 2011 09:33PM UTC by dmethvin comment:9

description: I am attempting to support "live" events in a custom special event, and the data object passed in the "bind" method gets passed into my special event "setup" function. This allows accepting that argument as options. This does not work with the "live" method. The "data" property is correctly set in the "live" handler "event" object, but not passed into my special event "setup" function.\ \ It is a very small change indeed. On line 2029 of jQuery 1.4.2,in the "jQuery.event.special.live.add" function, simply add the "handleObj.data" property as the fourth argument to "jQuery.event.add". Alternatively, this could be handled within the "jQuery.event.add" method.\ \ As a side note. I think the "liveHandler" and "liveConvert" methods, which are currently private, should be moved to the "jQuery.event.special.live" object. This would allow plugins to leverage more of the "live" features for development. I would also be able to patch the previously mentioned issue within my special event plugin, but I cannot because "liveHandler" is private.I am attempting to support "live" events in a custom special event, and the data object passed in the "bind" method gets passed into my special event "setup" function. This allows accepting that argument as options. This does not work with the "live" method. The "data" property is correctly set in the "live" handler "event" object, but not passed into my special event "setup" function. \ \ It is a very small change indeed. On line 2029 of jQuery 1.4.2,in the "jQuery.event.special.live.add" function, simply add the "handleObj.data" property as the fourth argument to "jQuery.event.add". Alternatively, this could be handled within the "jQuery.event.add" method. \ \ As a side note. I think the "liveHandler" and "liveConvert" methods, which are currently private, should be moved to the "jQuery.event.special.live" object. This would allow plugins to leverage more of the "live" features for development. I would also be able to patch the previously mentioned issue within my special event plugin, but I cannot because "liveHandler" is private.

+1, on allowing data in delegated events, but not on exposing liveHandler etc because I'd like to rework that.

Changed June 03, 2011 01:28PM UTC by john comment:10

description: I am attempting to support "live" events in a custom special event, and the data object passed in the "bind" method gets passed into my special event "setup" function. This allows accepting that argument as options. This does not work with the "live" method. The "data" property is correctly set in the "live" handler "event" object, but not passed into my special event "setup" function. \ \ It is a very small change indeed. On line 2029 of jQuery 1.4.2,in the "jQuery.event.special.live.add" function, simply add the "handleObj.data" property as the fourth argument to "jQuery.event.add". Alternatively, this could be handled within the "jQuery.event.add" method. \ \ As a side note. I think the "liveHandler" and "liveConvert" methods, which are currently private, should be moved to the "jQuery.event.special.live" object. This would allow plugins to leverage more of the "live" features for development. I would also be able to patch the previously mentioned issue within my special event plugin, but I cannot because "liveHandler" is private.I am attempting to support "live" events in a custom special event, and the data object passed in the "bind" method gets passed into my special event "setup" function. This allows accepting that argument as options. This does not work with the "live" method. The "data" property is correctly set in the "live" handler "event" object, but not passed into my special event "setup" function.\ \ It is a very small change indeed. On line 2029 of jQuery 1.4.2,in the "jQuery.event.special.live.add" function, simply add the "handleObj.data" property as the fourth argument to "jQuery.event.add". Alternatively, this could be handled within the "jQuery.event.add" method.\ \ As a side note. I think the "liveHandler" and "liveConvert" methods, which are currently private, should be moved to the "jQuery.event.special.live" object. This would allow plugins to leverage more of the "live" features for development. I would also be able to patch the previously mentioned issue within my special event plugin, but I cannot because "liveHandler" is private.

+1, Seems simple enough.

Changed June 03, 2011 02:40PM UTC by scottgonzalez comment:11

+1, sounds like a bug

Changed June 06, 2011 03:42PM UTC by jzaefferer comment:12

+0

Changed July 12, 2011 02:20PM UTC by dmethvin comment:13

description: I am attempting to support "live" events in a custom special event, and the data object passed in the "bind" method gets passed into my special event "setup" function. This allows accepting that argument as options. This does not work with the "live" method. The "data" property is correctly set in the "live" handler "event" object, but not passed into my special event "setup" function.\ \ It is a very small change indeed. On line 2029 of jQuery 1.4.2,in the "jQuery.event.special.live.add" function, simply add the "handleObj.data" property as the fourth argument to "jQuery.event.add". Alternatively, this could be handled within the "jQuery.event.add" method.\ \ As a side note. I think the "liveHandler" and "liveConvert" methods, which are currently private, should be moved to the "jQuery.event.special.live" object. This would allow plugins to leverage more of the "live" features for development. I would also be able to patch the previously mentioned issue within my special event plugin, but I cannot because "liveHandler" is private.I am attempting to support "live" events in a custom special event, and the data object passed in the "bind" method gets passed into my special event "setup" function. This allows accepting that argument as options. This does not work with the "live" method. The "data" property is correctly set in the "live" handler "event" object, but not passed into my special event "setup" function. \ \ It is a very small change indeed. On line 2029 of jQuery 1.4.2,in the "jQuery.event.special.live.add" function, simply add the "handleObj.data" property as the fourth argument to "jQuery.event.add". Alternatively, this could be handled within the "jQuery.event.add" method. \ \ As a side note. I think the "liveHandler" and "liveConvert" methods, which are currently private, should be moved to the "jQuery.event.special.live" object. This would allow plugins to leverage more of the "live" features for development. I would also be able to patch the previously mentioned issue within my special event plugin, but I cannot because "liveHandler" is private.
milestone: 1.next1.7
owner: → dmethvin
status: openassigned

Changed September 20, 2011 12:55PM UTC by dmethvin comment:14

resolution: → fixed
status: assignedclosed

In 1.7 the data argument is available via handleObj.data. Determine whether the event is delegated or not by looking at handleObj.selector which will be undefined if it is not delegated.