"$.event.special.live.add" does not pass data argument to "$.event.add"

"$.event.special.live.add" does not pass data argument to "$.event.add"

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.

http://dev.jquery.com/ticket/6386