slider icon indicating copy to clipboard operation
slider copied to clipboard

Illegal invocation of RAF when tooltip is applied to a slider that is not visible when initially rendered

Open zbuttram opened this issue 4 years ago • 1 comments

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.

zbuttram avatar Dec 22 '20 20:12 zbuttram

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?

kwhitaker avatar Dec 03 '21 14:12 kwhitaker