react-draggable
react-draggable copied to clipboard
Issue loading inline style because of CSP policy
The react-draggable library adds a
We get a CSP error saying that the browser refuses to apply an inline style because it violates the CSP policy.
Reference - https://content-security-policy.com/
![Screen Shot 2022-05-10 at 5 11 24 PM](https://user-images.githubusercontent.com/19785436/167722578-9c27cbd4-dae3-4501-8657-42758f990ac6.png)
React-draggable version 3.1.1
Tried upgrading to latest version of both React-Draggable and react-grid-layout but there is no support for strict CSP.
Fix can be by providing nonce variable support like many other libraries. Or not use inline style.
This is an issue for Grafana users who want to prevent inline styles as part of their CSP.
Perhaps adding a nonce
prop to ReactGridLayout
, Draggable
, and Resizable
would be enough?