darsain / sly

JavaScript library for one-directional scrolling with item based navigation support.
http://darsa.in/sly
2.87k stars 497 forks source link

Implement scrolling with wheel event and fall back to mousewheel #138

Closed darsain closed 10 years ago

darsain commented 10 years ago

Drop DOMMouseScroll, and implement wheel event, which is available since:

Chrome 31+ Nov 2013

Firefox 17+ Nov 2012 Dropping DOMMouseScroll would mean dropping support for Firefox lower than 17, as Firefox doesn't fallback to mousewheel at all.

IE 9+ Has wheel support, but it is impossible to detect. Just using wheel everywhere so IE9+ can have a nice scrolling experience would mean dropping support for IE8, which is a no go for a lot of people. Fuck everything about this browser, seriously...


darsain commented 10 years ago

So it seems that wheel event is undetectable in IE9+, even though these abominations support it.

Seeing that it's not much of an issue to use only wheel event in Chrome and Firefox, the dilemma now is to either drop support for IE8-, or have a crappy scrolling implementation on all IE9+ browsers (IE's mousewheel event doesn't expose deltaX & deltaY. it's just a direction agnostic delta).

IE8 market share is now ~5%, and most of it seems to be from China.

I guess I'm just gonna drop IE8 support.