Cancel diff processing when the diff processor is detached
Bug: Issue 4730 Change-Id: I50cae3c2c59b447befdccde3fcb4bf4a7dadcae8
This commit is contained in:
@@ -86,6 +86,7 @@
|
||||
},
|
||||
|
||||
detached: function() {
|
||||
this.cancel();
|
||||
this.unlisten(window, 'scroll', '_handleWindowScroll');
|
||||
},
|
||||
|
||||
|
@@ -591,5 +591,12 @@ limitations under the License.
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('detaching cancels', function() {
|
||||
element = fixture('basic');
|
||||
sandbox.stub(element, 'cancel');
|
||||
element.detached();
|
||||
assert(element.cancel.called);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user