You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are several Radix UI Primitives that rely on dangerouslySetInnerHtml to inject content into <style> tags, for example the <ScrollArea> (see code) and <Select> (see code) components.
Bug report
Current Behavior
There are several Radix UI Primitives that rely on
dangerouslySetInnerHtml
to inject content into<style>
tags, for example the<ScrollArea>
(see code) and<Select>
(see code) components.This causes issues in React apps that has set trusted types in their CSP headers.
p/s: Not all browsers support the trusted types CSP header yet.
Expected behavior
Using these components should not cause warnings in browsers that support trusted types CSP headers serving a React App with such headers set.
Suggested solution
dangerouslySetInnerHtml
to set inline stylesYour environment
@radix-ui/react-scroll-area
,@radix-ui/react-select
The text was updated successfully, but these errors were encountered: