From 3dde3ebb0c13e231a19e752f1ebe38525317f0f7 Mon Sep 17 00:00:00 2001 From: Fedor Date: Wed, 22 Oct 2014 17:09:45 +0400 Subject: [PATCH] Correction for railBorderYWidth calculation --- src/perfect-scrollbar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/perfect-scrollbar.js b/src/perfect-scrollbar.js index 8095dba..ffef5c0 100644 --- a/src/perfect-scrollbar.js +++ b/src/perfect-scrollbar.js @@ -113,7 +113,7 @@ var scrollbarYRight = int($scrollbarYRail.css('right')); var isScrollbarYUsingRight = scrollbarYRight === scrollbarYRight; // !isNaN var scrollbarYLeft = isScrollbarYUsingRight ? null : int($scrollbarYRail.css('left')); - var railBorderYWidth = int($scrollbarXRail.css('borderTopWidth')) + int($scrollbarXRail.css('borderBottomWidth')); + var railBorderYWidth = int($scrollbarYRail.css('borderTopWidth')) + int($scrollbarYRail.css('borderBottomWidth')); function updateScrollTop(currentTop, deltaY) { var newTop = currentTop + deltaY;