Ionic-framework: [Ionic v4] Navigation -> TypeError: Cannot read property 'removeEventListener' of undefined

Created on 21 Jul 2018  路  3Comments  路  Source: ionic-team/ionic-framework

Ionic Info
@ionic/angular: "4.0.0-alpha.11"

Describe the Bug
I've got two pages both containing a slider (if that's related no idea), when I navigate (goRoot) from the first one to the second one I face the following error

Uncaught TypeError: Cannot read property 'removeEventListener' of undefined
at t.disableDraggable (k2weomgc.js:5)
at t.destroy (k2weomgc.js:5)
at t.destroy (k2weomgc.js:5)
at k2weomgc.js:5
at Array.forEach ()
at k2weomgc.js:5
at Array.forEach ()
at t.push../node_modules/@ionic/core/dist/esm/es5/k2weomgc.js.h.emit (k2weomgc.js:5)
at t.destroy (k2weomgc.js:5)
at e.componentDidUnload (k2weomgc.js:5)

the first call of that stacktrace is the following:

 e.prototype.componentDidUnload=function(){this.swiper.destroy(!0,!0)}

the last one

 d.touch||!d.pointerEvents&&!d.prefixedPointerEvents?(d.touch&&(a.removeEventListener(i.start,this.scrollbar.onDragStart,r),a.removeEventListener(i.move,this.scrollbar.onDragMove,r),a.removeEventListener(i.end,this.scrollbar.onDragEnd,o)), etc.
triage

Most helpful comment

the PR of @adamlacombe delivered with v4-beta1 fix the issue

thx a lot 馃憤

All 3 comments

I think this is related to the slider. I have the same error when navigating away from a page with a slider.

the PR of @adamlacombe delivered with v4-beta1 fix the issue

thx a lot 馃憤

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings