-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Description
CSP inline-style error when hovering over the donut chart tooltip
Description
When hovering over the donut chart, the tooltip appears, but it triggers a CSP violation due to inline styles.
Steps to Reproduce
- Render a donut chart with tooltips enabled.
- Ensure CSP settings prohibit
style-src 'self' 'nonce-123456' https:;styles. - Hover over the chart to display the tooltip.
- Check the browser console for CSP errors.
Expected Behavior
The tooltip should be displayed without causing CSP violations.
Actual Behavior
The browser console reports a CSP violation related to style="background-color: ...".
Possible Cause
After reviewing the source code, I found that inline styles are applied to the tooltip using style="background-color: ...", which is blocked by CSP.
Suggested Fix
Consider using CSS classes or a safer approach to apply styles instead of inline styles.
Environment
- Library/Framework: [Specify the version]
- Browser: [Specify browser & version]
- CSP Settings:
style-src 'self';(or other restrictions in place)
Would appreciate any suggestions or fixes regarding this issue. Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels