Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
peterpeterparker opened this issue Jul 21, 2018 · 3 comments
Labels

Comments

@peterpeterparker
Copy link
Contributor

peterpeterparker commented Jul 21, 2018

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.
@ionitron-bot ionitron-bot bot added the triage label Jul 21, 2018
@tntwist
Copy link
Contributor

tntwist commented Jul 21, 2018

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

@peterpeterparker
Copy link
Contributor Author

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

thx a lot 👍

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 1, 2018

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants