Closed tbosch closed 11 years ago
Perhaps just use normal overflow scroll on desktop?
Yes, but it's not so easy to detect "desktop" browser. I thought adding this to your lib would make things easier...
Can't we just detect the presence of touch in document?
I could try it, but it may be hard to get it to work well. Although I think even on desktop with lists of 100-200+, fake scrolling is better performance. So it may be worth doing.
Well, newer "desktops" have touch and mouse / touchpad support (e.g. Chrome Pixel)...
oh good point. OK, I will get mousewheel to work.
I tried mousewheel last night and failed to get it to work smoothly - the problem is that there is no 'mousewheelend' event - the best I could do is check if there has been no mousewheel event since 100ms ago or so - but no matter what I set for the ms it still looks bad.
My next attempt will be just to listen to the 'scroll' event and set the transform to whatever the scroll change was.
edit: not doing this approach
Not bad. However, the fixed top toolbar is hoping up and down when I scroll using my mac touchpad... Aah, didn't think this was so complicated, but apparently it is!
If we are ok with no acceleration on desktop, I could go back to catching mousewheel event. That would be more reliable.
There are just so many though. mousewheel, arrow keys, spacebar, ...
Yes, I think so too. At least it would be accessible on the desktop, which is already a good improvement.
OK, added desktopScroller service. It's landed in master. I tested it manually but didn't have time to add unit tests this morning for it. But it works a lot lot lot better now :-)
And there are unit tests for scroller.js now.
There's simply no boundary bouncing on desktop now, but that's a lot better than trying to fake it .. since none of the desktop scroll keys have "end" events, there's no way to fake it reliably.
@tigbro could you try it in angular-jqm and see if its good? I probably won't have time until late this week.
Will look into it tomorrow.
Great work, scrolling on the desktop works fine with both, scroll wheel and keys! You could also add a scrollbar, but I think that's just a detail.
So I think we could close this?
Hi, it would be great to do the scrolling also with the mousewheel or with the keys. This would result in a better experience if mobile sites are viewed on desktop browsers without touch screen.
By the way, scrolling using the mouse right now (with click and move) is not working so well. Could you have a look into that?
Tobias