Prevent dragging if the mouse is on a scroll bar. #2

Closed
aaronwaldon wants to merge 1 commit from patch-1 into master

View file

@ -79,6 +79,17 @@
* @return {boolean} The parent's _mouseStart return value
*/
_mouseStart: function (event) {
//-- start contribution by Aaron Waldon (@aaronwaldon on Github)
//prevent drag if a scroll bar
if ( event.pageX - this.element.offset().left + this.element.prop('scrollLeft') > this.element.prop('scrollWidth') ) { //horizontal scroll
return false;
}
if ( event.pageY - this.element.offset().top + this.element.prop('scrollTop') > this.element.prop('scrollHeight') ) { //vertical scroll
return false;
}
//-- end contribution by Aaron Waldon
var retValue = this._super(event);
this.lastDragEvent = null;
this.scrollInfo = {
@ -393,4 +404,4 @@
return retValue;
}
});
})(jQuery);
})(jQuery);