mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Do not ignore jquery-event extra parameters
This commit is contained in:
@@ -303,16 +303,18 @@ UI.Component.notifyParented = function () {
|
|||||||
var wrappedHandler = function (event) {
|
var wrappedHandler = function (event) {
|
||||||
var comp = UI.DomRange.getContainingComponent(event.currentTarget);
|
var comp = UI.DomRange.getContainingComponent(event.currentTarget);
|
||||||
var data = comp && getComponentData(comp);
|
var data = comp && getComponentData(comp);
|
||||||
|
var args = _.toArray(arguments);
|
||||||
updateTemplateInstance(self);
|
updateTemplateInstance(self);
|
||||||
return Deps.nonreactive(function () {
|
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
|
// Don't want to be in a deps context, even if we were somehow
|
||||||
// triggered synchronously in an existing deps context
|
// triggered synchronously in an existing deps context
|
||||||
// (the `blur` event can do this).
|
// (the `blur` event can do this).
|
||||||
// XXX we should probably do what Spark did and block all
|
// XXX we should probably do what Spark did and block all
|
||||||
// event handling during our DOM manip. Many apps had weird
|
// event handling during our DOM manip. Many apps had weird
|
||||||
// unanticipated bugs until we did that.
|
// unanticipated bugs until we did that.
|
||||||
return esh.handler.call(data === null ? {} : data,
|
return esh.handler.apply(data === null ? {} : data, args);
|
||||||
event, self.templateInstance);
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -872,7 +872,7 @@ var HandlerRec = function (elem, type, selector, handler, $ui) {
|
|||||||
return;
|
return;
|
||||||
if (! h.$ui.contains(evt.currentTarget))
|
if (! h.$ui.contains(evt.currentTarget))
|
||||||
return;
|
return;
|
||||||
return h.handler.call(h.$ui, evt);
|
return h.handler.apply(h.$ui, arguments);
|
||||||
};
|
};
|
||||||
})(this);
|
})(this);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user