Scroll is not working in Mobile devices
Hello, I'm using this ng-scrollbar to make beautiful scrolling view in my HTML pages. It seems good in desktop website but didn't work in mobile devices. Am I missing something? or This library support desktop websites only?
Same thing. I'm trying to fix it, but, maybe it will be better to write my own from scratch andcreate new unuseable thing.
Was this ever resolved?
Thought it was my implementation(inside a resizing div, inside a flexbox layout :s ) , but the demo confirms the issue is with the plugin itself.
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)
Id do pull/push thingy from git if I can ever work out how that works!
@CosyStudios the first replace, how and where to place it? can you paste the whole solution?