Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll is not working in Mobile devices #43

Open
vijayshegokar opened this issue Jul 17, 2015 · 5 comments
Open

Scroll is not working in Mobile devices #43

vijayshegokar opened this issue Jul 17, 2015 · 5 comments

Comments

@vijayshegokar
Copy link

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?

@seitbekir
Copy link

Same thing. I'm trying to fix it, but, maybe it will be better to write my own from scratch andcreate new unuseable thing.

@CosyStudios
Copy link

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.

@CosyStudios
Copy link

CosyStudios commented Jun 20, 2016

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)

@CosyStudios
Copy link

Id do pull/push thingy from git if I can ever work out how that works!

@Jaspur
Copy link

Jaspur commented May 18, 2017

@CosyStudios the first replace, how and where to place it? can you paste the whole solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants