mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(scroll): cleanup native scroll listeners only if activated
This commit is contained in:
@@ -126,4 +126,16 @@ describe('$ionicRefresh Controller', function() {
|
||||
ctrl.getRefresherDomMethods().hide();
|
||||
expect(refresher.classList.contains('invisible')).toBe(true);
|
||||
});
|
||||
|
||||
it('should cleanup when done', function() {
|
||||
setup();
|
||||
|
||||
expect(ctrl.__getScrollChild()).not.toBe(null);
|
||||
expect(ctrl.__getScrollParent()).not.toBe(null);
|
||||
|
||||
scope.$broadcast('$destroy');
|
||||
|
||||
expect(ctrl.__getScrollChild()).toBe(null);
|
||||
expect(ctrl.__getScrollParent()).toBe(null);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user