slider
slider copied to clipboard
Illegal invocation of RAF when tooltip is applied to a slider that is not visible when initially rendered
We noticed this in our app when we put a tooltipped slider inside a popover, the app would crash when the popover was opened and the console would have an error throwing "Illegal invocation" on the raf.cancel
call here: https://github.com/react-component/slider/blob/master/src/common/SliderTooltip.tsx#L15
This is caused by rc-util not binding its wrapped version of requestAnimationFrame to the window object. This is fixed in a newer version of rc-util. As a workaround we have pinned the version of rc-util used by rc-slider to ^5.5.1 via yarn's resolutions feature, but it should probably get version-bumped here as well.
I'm also seeing this issue, and pinning the dependency for rc-slider
does not seem to solve the issue.
"resolutions": {
"rc-slider/**/rc-util": "^5.16.1"
}
Are there any plans to update the rc-util
dependency in the near future?