Do not ignore jquery-event extra parameters

This commit is contained in:
apendua
2014-03-31 11:09:32 +02:00
parent c918bae9ab
commit b2193f5fa7
2 changed files with 5 additions and 3 deletions

View File

@@ -303,16 +303,18 @@ UI.Component.notifyParented = function () {
var wrappedHandler = function (event) {
var comp = UI.DomRange.getContainingComponent(event.currentTarget);
var data = comp && getComponentData(comp);
var args = _.toArray(arguments);
updateTemplateInstance(self);
return Deps.nonreactive(function () {
// put self.templateInstance as the second argument
args.splice(1, 0, self.templateInstance);
// Don't want to be in a deps context, even if we were somehow
// triggered synchronously in an existing deps context
// (the `blur` event can do this).
// XXX we should probably do what Spark did and block all
// event handling during our DOM manip. Many apps had weird
// unanticipated bugs until we did that.
return esh.handler.call(data === null ? {} : data,
event, self.templateInstance);
return esh.handler.apply(data === null ? {} : data, args);
});
};

View File

@@ -872,7 +872,7 @@ var HandlerRec = function (elem, type, selector, handler, $ui) {
return;
if (! h.$ui.contains(evt.currentTarget))
return;
return h.handler.call(h.$ui, evt);
return h.handler.apply(h.$ui, arguments);
};
})(this);