Basically I am using jQuery ui's selectable functionality on a ul
, but the ul will often times have a scrollbar, and this scrollbar becomes unusable in Webkit browsers since when you try to click on it to grab it, the lasso for the selectable functionality is drawn overtop instead.
I have formulated a solution, which involves checking the position of the cursor in relation to the position and width of the ul to see if the cursor is over the scrollbar, and if so, stop propagation of the selectable 'start' event, but despite the conditional being met when it should be, neither returning false nor stopping progation of the event seems to prevent jquery from progressing through the selectable events.
Here is what I have for the jquery .selectable
start
event:
start: function(event, ui) {
var t = event.target;
var cutoff = t.scrollWidth + t.offsetLeft
if (event.clientX > cutoff)
{
console.log('NO!');
console.log(event.type);
//overkill
event.stopPropagation();
event.stopImmediatePropagation();
if (event.stopPropagation) {
event.stopPropagation();
} else {
event.cancelBubble = true;
}
return false;
}
}
All advice/solutions appreciated, Thanks!