>
Slick draggable scrolling is a key part of many screens in Delta’s in-flight entertainment system (complete with momentum-based flicks, over-scroll, page-snapping, etc). Because I didn’t have access to a component library and hadn’t thought to pre-install a good drag scroll library, I ended up having to build my own.Shouldn’t have been using any drag scroll library. This is very strongly something that you should never do on the web, because it doesn’t have the right primitives to make it anything other than bad. Scrolljacking is always bad.
The proper solution is to just use normal scroll containers. Seriously.
That provides what you want for touch-based scrolling, without ruining click-and-drag or scroll-wheel or keyboard scrolling. It gets you your momentum-based flicks, leaves overscroll behaviour up to the user agent (which will be bounce on some platforms like Apple’s I believe, a glowing indicator on others like Android I believe, and nothing on some if you’ve also hidden the scrollbar with `scrollbar-width: none`), and you can use CSS Scroll Snap to control snapping if you want (though frankly I think it’s almost always better not to try to control that stuff).