diff --git a/dist/perfect-scrollbar.js b/dist/perfect-scrollbar.js index 0f8e4b5..89ef62e 100644 --- a/dist/perfect-scrollbar.js +++ b/dist/perfect-scrollbar.js @@ -576,10 +576,10 @@ let scrollBy = null; function mouseMoveHandler(e) { - const y = e.touches && e.touches[0] ? e.touches[0].pageY : e[pageY]; + const py = e.touches && e.touches[0] ? e.touches[0].pageY : e[pageY]; element[scrollTop] = - startingScrollTop + scrollBy * (y - startingMousePageY); + startingScrollTop + scrollBy * (py - startingMousePageY); addScrollingClass(i, y); updateGeometry(i); diff --git a/src/handlers/drag-thumb.js b/src/handlers/drag-thumb.js index b953088..66ecbfc 100644 --- a/src/handlers/drag-thumb.js +++ b/src/handlers/drag-thumb.js @@ -53,10 +53,10 @@ function bindMouseScrollHandler( let scrollBy = null; function mouseMoveHandler(e) { - const y = e.touches && e.touches[0] ? e.touches[0].pageY : e[pageY]; + const py = e.touches && e.touches[0] ? e.touches[0].pageY : e[pageY]; element[scrollTop] = - startingScrollTop + scrollBy * (y - startingMousePageY); + startingScrollTop + scrollBy * (py - startingMousePageY); addScrollingClass(i, y); updateGeometry(i);