Skip to content

Commit a00c5b7

Browse files
smielowskijroggervalf
smielowskij
authored andcommitted
fix(style injection): change style injection default root
Change style injection root to evaluated parent node, that should equal to nearest shadow root host, otherwise use head fix #665
1 parent 401ef82 commit a00c5b7

File tree

2 files changed

+765
-474
lines changed

2 files changed

+765
-474
lines changed

Diff for: src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class ReactTooltip extends React.Component {
185185
parentNode = parentNode.parentNode;
186186
}
187187
const head = parentNode.querySelector('head');
188-
domRoots.push(head || parentNode);
188+
domRoots.push(parentNode || head);
189189
});
190190
if (domRoots.length) {
191191
const style = document.createElement('style');

0 commit comments

Comments
 (0)