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

[SliderUnstyled] TypeError Cannot read property 'getBoundingClientRect' of null #26754

Open
luminaxster opened this issue Jun 14, 2021 · 3 comments
Assignees
Labels
bug 🐛 Something doesn't work component: slider This is the name of the generic UI component, not the React module!

Comments

@luminaxster
Copy link
Contributor

When using controlled sliders, while interacting with them, I continuously get errors on this line:
https://github.com/mui-org/material-ui/blob/2d4d0663ff1ed732e6952705d0e23eda13ae25ea/packages/material-ui-unstyled/src/SliderUnstyled/SliderUnstyled.js#L384

Due to this call:
https://github.com/mui-org/material-ui/blob/2d4d0663ff1ed732e6952705d0e23eda13ae25ea/packages/material-ui-unstyled/src/SliderUnstyled/SliderUnstyled.js#L460

It seems to be related to the slider being unmounted while event callbacks related to the notch being dragged are still triggered, for example in a Tooltip:
https://codesandbox.io/s/unstyledslider-material-demo-forked-7yzjd?file=/demo.js
Screen Shot 2021-06-14 at 3 03 37 PM
I hold the notch, slide it three or four times, and suddenly move the cursor away while still holding the notch, forcing the tooltip to close, and after some tries, it throws the error:
Screen Shot 2021-06-14 at 3 04 09 PM

@eps1lon eps1lon added bug 🐛 Something doesn't work component: slider This is the name of the generic UI component, not the React module! labels Jun 16, 2021
@eps1lon
Copy link
Member

eps1lon commented Jun 16, 2021

Thanks for the report.

I added a screen recording to help understand the issue:

slider-getbounding-type-error.mp4

@AshuKV
Copy link

AshuKV commented Jun 19, 2021

I want to work on this issue. Please assign this issue to me.

@luminaxster
Copy link
Contributor Author

Any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: slider This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

3 participants