zillow / react-slider

Accessible, CSS agnostic, slider component for React.
https://zillow.github.io/react-slider
MIT License
892 stars 231 forks source link

Issue with getBoundingClientRect() being called on undefined component #63

Closed clayne11 closed 6 years ago

clayne11 commented 8 years ago

This PR brought in a setTimeout before calling for getBoundingClientRect(). This can cause an issue in some situations where the component is unmounted before this call is made thus throwing an exception.

blanchma commented 8 years ago

Same problem here: Uncaught TypeError: slider.getBoundingClientRect is not a function(anonymous function) @ react-slider.js?b78f:280

iest commented 8 years ago

I'm getting the same issue.

istrel commented 8 years ago

This issue is caused by updating component and therefore calling extra this._handleResize. After that this.resizeTimeout value rewritten with new timeout handle although old timeout is not cleared. So after unmounting the old resizeTimeout is still going to happen. When it happens it faces empty refs and therefore throws the error

mpowaga commented 6 years ago

Closing this issue because #67 has been merged.