1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-06 13:46:42 +02:00

Fix Manipulator.offset() (#33603)

* test: add more test cases for Manipulator.offset()

* fix: Manipulator.offset() is using obsolete properties to get scroll position

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: GeoSot <geo.sotis@gmail.com>
This commit is contained in:
alpadev
2021-07-28 16:23:32 +02:00
committed by GitHub
parent 24e14c36e8
commit 047145e808
2 changed files with 56 additions and 2 deletions

View File

@@ -64,8 +64,8 @@ const Manipulator = {
const rect = element.getBoundingClientRect()
return {
top: rect.top + document.body.scrollTop,
left: rect.left + document.body.scrollLeft
top: rect.top + window.pageYOffset,
left: rect.left + window.pageXOffset
}
},