diff options
| author | alpadev <[email protected]> | 2021-07-28 16:23:32 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-07-28 17:23:32 +0300 |
| commit | 047145e8086793e7c39747e70f5d74a8860c2e50 (patch) | |
| tree | acd12f5076ead349866f6aae316d329c6ec98327 /js/src/dom | |
| parent | 24e14c36e86536853d5103a82064e514393cf480 (diff) | |
| download | bootstrap-047145e8086793e7c39747e70f5d74a8860c2e50.tar.xz bootstrap-047145e8086793e7c39747e70f5d74a8860c2e50.zip | |
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 <[email protected]>
Co-authored-by: GeoSot <[email protected]>
Diffstat (limited to 'js/src/dom')
| -rw-r--r-- | js/src/dom/manipulator.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/src/dom/manipulator.js b/js/src/dom/manipulator.js index 113817bee..a866993f0 100644 --- a/js/src/dom/manipulator.js +++ b/js/src/dom/manipulator.js @@ -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 } }, |
