From 69efcbbbc6784aa06e3118d2ec743034f1976dd2 Mon Sep 17 00:00:00 2001 From: David Greenspan Date: Tue, 24 Apr 2012 17:19:23 -0700 Subject: [PATCH] comments --- packages/liveui/liveui.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/liveui/liveui.js b/packages/liveui/liveui.js index 33dd574647..90b6563f06 100644 --- a/packages/liveui/liveui.js +++ b/packages/liveui/liveui.js @@ -403,7 +403,7 @@ Meteor.ui = Meteor.ui || {}; } var copyFunc = function(t, s) { - $(t).unbind(); // XXX remove jquery events from node + $(t).unbind(); // XXX jQuery dependency tgtRange.transplant_tag(t, s); }; @@ -545,9 +545,14 @@ Meteor.ui = Meteor.ui || {}; }; var cleanup_frag = function(frag) { + // wrap the frag in a new LiveRange that will be destroyed cleanup_range(new LiveRange(Meteor.ui._tag, frag)); }; + // Cleans up a range and its descendant ranges by calling + // killContext on them (which removes any associated context + // from dependency tracking) and then destroy (which removes + // the liverange data from the DOM). var cleanup_range = function(range) { range.visit(function(is_start, range) { if (is_start)