diff --git a/packages/core/src/components/scroll/scroll.tsx b/packages/core/src/components/scroll/scroll.tsx index 9b5dfa44d2c..53aec612c71 100644 --- a/packages/core/src/components/scroll/scroll.tsx +++ b/packages/core/src/components/scroll/scroll.tsx @@ -85,6 +85,12 @@ export class Scroll { } } + componentDidUnload() { + if (this.watchDog) { + clearInterval(this.watchDog); + } + } + @Listen('scroll', { passive: true }) onScroll(ev: UIEvent) { const timeStamp = Date.now(); @@ -220,6 +226,9 @@ export class Scroll { isScrolling: true }); + if (this.watchDog) { + clearInterval(this.watchDog); + } // watchdog this.watchDog = setInterval(() => { if (this.lastScroll < Date.now() - 120) {