From 24b34d3deabc1250049a0d466a762f6bbf65f361 Mon Sep 17 00:00:00 2001 From: Axel Bocciarelli Date: Thu, 19 Nov 2015 11:05:57 +1100 Subject: [PATCH] fix scroll-end events not triggered ... when dragging the scrollbar to the end with the mouse. --- src/js/plugin/update-scroll.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/plugin/update-scroll.js b/src/js/plugin/update-scroll.js index ff41ae4..3eab8e8 100644 --- a/src/js/plugin/update-scroll.js +++ b/src/js/plugin/update-scroll.js @@ -56,13 +56,13 @@ module.exports = function (element, axis, value) { var i = instances.get(element); - if (axis === 'top' && value > i.contentHeight - i.containerHeight) { + if (axis === 'top' && value >= i.contentHeight - i.containerHeight) { element.scrollTop = i.contentHeight - i.containerHeight; element.dispatchEvent(yEndEvent); return; // don't allow scroll past container } - if (axis === 'left' && value > i.contentWidth - i.containerWidth) { + if (axis === 'left' && value >= i.contentWidth - i.containerWidth) { element.scrollLeft = i.contentWidth - i.containerWidth; element.dispatchEvent(xEndEvent); return; // don't allow scroll past container