Skip to content

Issue loading inline style because of CSP policy #659

Description

@ssrivastava1207

The react-draggable library adds a <style> tag to the with just a couple of CSS style rules in it. This is the style tag with id = react-draggable-style-el. It is only added once per page load.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions