The content inside the Scrollbar component is not visible, and scrolling is not possible.
Steps to reproduce it and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have extra dependencies other than react-scrollbars-custom. Paste the link to your JSFiddle or CodeSandbox example below:
What is the current behavior?
With a CSP of
style-src 'self'
, the following error or similar is logged by the browser:The cause is this code in
getScrollbarWidth
insrc/util.tsx
:The content inside the
Scrollbar
component is not visible, and scrolling is not possible.Steps to reproduce it and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have extra dependencies other than
react-scrollbars-custom
. Paste the link to your JSFiddle or CodeSandbox example below:https://codesandbox.io/s/autumn-fast-n5p48h?file=/public/index.html
Basically, add the following meta tag to the HTML of your project:
What is the expected behavior?
No CSP violations from react-scrollbars-custom. Scrolling works.
A little about versions:
react-scrollbars-custom
: 4.1.1