Closed badoet closed 8 years ago
Yes I confirm it's limited to the scroll area..
+1
I just set it to the default browser scroll bar when a touch device is detected.
Hi @ehsan89, would you mind amending the README to help others avoid this in the future ?
Whats the best outcome for people here? I've completly hidden the scrollbar area for neatness and was expecting scroll to work on the content. touching a scrollbar rather than the content area seems pretty ludicrous, especially if its a sharp , thin one! Might do a pull and modify...
Heres a cheeky fix...... REPLACE
thumb.on('touchstart', function (event) {
lastOffsetY = event.originalEvent.changedTouches[0].pageY - thumb[0].offsetTop;
win.on('touchend', _touchEnd);
win.on('touchmove', _touchDragHandler);
event.preventDefault();
});
with
transculdedContainer.on('touchStart).......
AND
--- yes this works, but the action is opposite what is expected from a direct touch so altered code should be as above, replacing thumb with transcludedContainer
so changing the thumbDrag handler from
var thumbDrag = function (event, offsetX, offsetY) {
dragger.top = Math.max(0, Math.min(parseInt(dragger.trackHeight, 10) - parseInt(dragger.height, 10), offsetY));
event.stopPropagation();
};
to
var thumbDrag = function (event, offsetX, offsetY) {
dragger.top = Math.max(0, Math.min(parseInt(dragger.trackHeight, 10) - parseInt(dragger.height, 10), **-**offsetY));
event.stopPropagation();
};
(ammended a '-' to offsetY)
is the touch event only limited to the scroll bar area? it cant do the touch the content area and drag to scroll right? or am i missing something?