buzinas / simple-scrollbar

Very simple and lightweight vanilla javascript library for creating a custom scrollbar cross-browser.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

So is this thing mobile friendly?

Puddingboy opened this issue · comments

Will touch gestures make the scrollbar move or will it ignore touch untill I use hammer or some other library? I am not sure if we understand the same thing with the word native.

*edit: Your use of mousedown, mouseup and mousemove would suggest it is. I just don't want this to be too good to be true

It works with mobile touches exactly the same way as native scrollbars do.
Em 05/06/2016 13:30, "Puddingboy" notifications@github.com escreveu:

Will touch gestures make the scrollbar move or will it ignore touch untill
I use hammer or some other library? I am not sure if we understand the same
thing with the word native.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#6, or mute the thread
https://github.com/notifications/unsubscribe/AG9ehzRIoO4uCKFJtWSyD2P53Sb0Eq0gks5qIvmLgaJpZM4IuY_s
.

Roger that. I did test it with my phone on your demo, but I did notice that the body background scrolled aswell. I suppose I would have to block background scrolling somehow. Do you have any ideas to make this work? So while simple-scrollbar is scrolling other content is blocked from scrolling?

If you want that behavior, you can put the following css rule there:

body {
  overflow: hidden;
}

Em 05/06/2016 15:40, "Puddingboy" notifications@github.com escreveu:

Roger that. I did test it with my phone on your demo, but I did notice
that the body background scrolled aswell. I suppose I would have to block
background scrolling somehow. Do you have any ideas to make this work? So
while simple-scrollbar is scrolling other content is blocked from scrolling?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#6 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AG9eh70pus1bKDyhV_K9HeuIE-XzDmXaks5qIxgagaJpZM4IuY_s
.

I think I like that approach. I found a different suggestion that blocks the event using javascript, but I think using js to change the overflow property temporary may be a an even better idea.

*edit: won't that make the page move a little in the process of changing this property?

Oh I'm not sure if it was clear from my last comment but what I meant was that if you have a page with a regular scrollbar and you put the overflow on hidden, the scrollbar disappears and the x offset of the page may jump a little.