We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed2ef61 commit 3a76250Copy full SHA for 3a76250
src/utils/getPosition.js
@@ -240,9 +240,12 @@ const calculateOffset = offset => {
240
const getParent = currentTarget => {
241
let currentParent = currentTarget;
242
while (currentParent) {
243
+ const computedStyle = window.getComputedStyle(currentParent);
244
+ // transform and will-change: transform change the containing block
245
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_Block
246
if (
- window.getComputedStyle(currentParent).getPropertyValue('transform') !==
- 'none'
247
+ computedStyle.getPropertyValue('transform') !== 'none' ||
248
+ computedStyle.getPropertyValue('will-change') === 'transform'
249
)
250
break;
251
currentParent = currentParent.parentElement;
0 commit comments