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

ResizeObserver not being unmounted alongside rangeslider component #100

Open
DolpZanso opened this issue Dec 4, 2017 · 1 comment
Open

Comments

@DolpZanso
Copy link

Hello. I found an issue where the resizeobserver that is being used with the rangeslider is still active even though the component has been unmounted. I observed this because my next page holds a react-id-swiper component, which generates a 'transitionend' event whenever it swipes. The resizeobserver has a transitionend event listener which triggers, and causes an error, because the resizeobserver was not properly disconnected on unmount of the rangeslider. Can you please help in fixing this? Many thanks

@bongtavas
Copy link

bongtavas commented Dec 6, 2017

This happens because the resizeObserver is not disconnected in unmount.

resizeObserver.observe(this.slider)

We might need to add

componentWillUnmount () {
  resizeObserver.unobserve(this.slider);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants