forked from AkkomaGang/akkoma-fe
fix
This commit is contained in:
parent
4f563e6efb
commit
0f55359b49
1 changed files with 5 additions and 3 deletions
|
@ -13,9 +13,11 @@ export const findOffset = (child, parent, { top = 0, left = 0 } = {}, ignorePadd
|
|||
if (child.offsetParent && (parent === window || parent.contains(child.offsetParent) || parent === child.offsetParent)) {
|
||||
return findOffset(child.offsetParent, parent, result, false)
|
||||
} else {
|
||||
if (parent !== window) {
|
||||
const { topPadding, leftPadding } = findPadding(parent)
|
||||
result.top += topPadding
|
||||
result.left += leftPadding
|
||||
}
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue