Skip to content

Commit

Permalink
fix: remove use of cssText in focus-guards (#1468)
Browse files Browse the repository at this point in the history
Violates Content-Security-Policy unless `style-src: 'unsafe-inline'` is
permitted otherwise. (from radix-ui)
  • Loading branch information
sadeghbarati authored Dec 3, 2024
1 parent 17eba00 commit 9a4038e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/radix-vue/src/shared/useFocusGuards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ function createFocusGuard() {
const element = document.createElement('span')
element.setAttribute('data-radix-focus-guard', '')
element.tabIndex = 0
element.style.cssText
= 'outline: none; opacity: 0; position: fixed; pointer-events: none'
element.style.outline = 'none'
element.style.opacity = '0'
element.style.position = 'fixed'
element.style.pointerEvents = 'none'
return element
}

0 comments on commit 9a4038e

Please sign in to comment.