We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0208aca + 4ed5a10 commit 92bcfd9Copy full SHA for 92bcfd9
src/util/getOffset.ts
@@ -30,7 +30,8 @@ export default function getOffset(
30
const scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;
31
const scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;
32
33
- relativeEl = relativeEl || body;
+
34
+ relativeEl = relativeEl || docEl || body;
35
36
const x = element.getBoundingClientRect();
37
const xr = relativeEl.getBoundingClientRect();
0 commit comments