Closes #5, using $.offset instead of clientHeight

This commit is contained in:
László Károlyi 2014-04-22 20:49:47 +02:00
parent 155a537cb5
commit c3f949a404
2 changed files with 5 additions and 5 deletions

View File

@ -94,11 +94,11 @@
* @return boolean The parent's _mouseStart return value
*/
_mouseStart: function (event) {
var pos = this.scrollElement.offset();
if (
(event.pageX > this.scrollElement.prop('clientWidth') +
this.scrollElement.prop('offsetLeft')) ||
(event.pageY > this.scrollElement.prop('clientHeight') +
this.scrollElement.prop('offsetTop'))) {
(event.pageX > this.scrollElement.prop('clientWidth') + pos.left) ||
(event.pageY > this.scrollElement.prop('clientHeight') + pos.top)
) {
return false;
}
var retValue = $.ui.selectable.prototype._mouseStart.call(this,

View File

@ -1,6 +1,6 @@
{
"name": "ui-selectableScroll",
"version": "0.1.5",
"version": "0.1.6",
"title": "An extended jQuery-ui selectable with scroll capabilities",
"licenses": [{
"type": "GPLv3",