codecomputerlove/PhotoSwipe — pull request #585 by thorstein5 (2013-08-25 21:01:09+00:00)
Title: New "wheel" event and Chrome and IE fixes

Adds support for the new "wheel" event and fixes various mouse wheel
related problems in Chrome and IE.

- Moved the enableMouseWheel check into the onMouseWheel handler and added e.preventDefault() to prevent vertical scrolling in IE10.
- Added mouse wheel handler to "window.document" instead of "window" to fix mouse wheel support in IE8.
- Added a delta check in the onMouseWheel handler to handle Chrome firing the mousewheel event twice, where wheelDelta isNothing the first time.
- Changed getWheelDelta and _normaliseMouseWheelType to support the new "wheel" event (the event that deprecates the legacy "mousewheel" event), which is currently supported by FF17+ and IE9+ in IE9 document mode.