Skip to content

Commit 92bcfd9

Browse files
authored
Merge pull request #2084 from TechSavvvyyy/fix-helping-layer-position
fix helping layer position
2 parents 0208aca + 4ed5a10 commit 92bcfd9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/util/getOffset.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export default function getOffset(
3030
const scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;
3131
const scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;
3232

33-
relativeEl = relativeEl || body;
33+
34+
relativeEl = relativeEl || docEl || body;
3435

3536
const x = element.getBoundingClientRect();
3637
const xr = relativeEl.getBoundingClientRect();

0 commit comments

Comments
 (0)