zippy1978/jquery.scrollz

Not working on Internet explorer (all versions)

Closed this issue · 3 comments

Hi, first of all thanks for that great plugin wich is doing exactly what it says.
I've an issue when using your plugin on all versions of Internet explorer.
Indeed when I try it on every version of internet explorer the scroll is just not workng, (the scroll is only going to top).
I've identified the origin of that behavior: it's come form the _handleMouseWheelEvent function, indeed the property: wheelDeltaY of event: event.originalEvent does not exist in IE browsers.
I've resolved it by changing the following portion of code
from :
if (event.type === 'mousewheel') {
offset = event.originalEvent.screenY - (event.originalEvent.screenY + event.originalEvent.wheelDeltaY);
}
to :
deltaY = event.originalEvent.wheelDeltaY != undefined ? event.originalEvent.wheelDeltaY : event.originalEvent.wheelDelta;
if (event.type === 'mousewheel') {
offset = event.originalEvent.screenY - (event.originalEvent.screenY + deltaY);
}

Hi,

And Thank you !

I will add your fix as soon as I can.

Regards,
Gilles

Done.
I just pushed the code.

Thanks again.

The pleasure is mine !