wrap event handling in Deps.nonreactive

This commit is contained in:
David Greenspan
2013-10-09 17:20:18 -07:00
parent 11aa6c65e2
commit e350782fce

View File

@@ -1217,7 +1217,15 @@ UI.Component.parented = function () {
var comp = UI.DomRange.getContainingComponent(event.currentTarget);
var data = comp && getComponentData(comp);
updateTemplateInstance(self);
esh.handler.call(data, event, self.templateInstance);
Deps.nonreactive(function () {
// 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.
esh.handler.call(data, event, self.templateInstance);
});
};
self.dom.on(esh.events, esh.selector, wrappedHandler);