react-draggable icon indicating copy to clipboard operation
react-draggable copied to clipboard

Issue loading inline style because of CSP policy

Open ssrivastava1207 opened this issue 2 years ago • 2 comments

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

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.

ssrivastava1207 avatar May 10 '22 21:05 ssrivastava1207

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?

kaydelaney avatar Jul 28 '22 13:07 kaydelaney