Skip to content

Commit

Permalink
fix(teleport): correctly select overlay container in shadow DOM
Browse files Browse the repository at this point in the history
  • Loading branch information
cgodo committed Aug 3, 2024
1 parent 9b02b0d commit a78f6a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vuetify/src/composables/teleport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export function useTeleport (target: () => (boolean | string | ParentNode)) {
return undefined
}

let container = targetElement.querySelector(':scope > .v-overlay-container')
const rootSelector = targetElement instanceof ShadowRoot ? ':host' : ':scope'
let container = targetElement.querySelector(`${rootSelector} > .v-overlay-container`)

if (!container) {
container = document.createElement('div')
Expand Down

0 comments on commit a78f6a4

Please sign in to comment.