From a42f9fe6a836f87b73ffa37fa1abf309e1826d32 Mon Sep 17 00:00:00 2001 From: sinchang Date: Sat, 24 Jun 2017 10:34:49 +0800 Subject: [PATCH] fixed #85 --- src/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.js b/src/utils.js index 3afe74a..3aaa562 100644 --- a/src/utils.js +++ b/src/utils.js @@ -28,11 +28,11 @@ module.exports = { } } else { - while (current !== null && current !== this.element) { + while (current !== null && current !== element) { actualLeft += current.offsetLeft; current = current.offsetParent; } } return actualLeft - elementScrollLeft; }, -}; \ No newline at end of file +};