fix scroll-end events not triggered
... when dragging the scrollbar to the end with the mouse.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user