ie8 & ie7: Cannot scroll using mousewheel for jscrollpane v2.0.14 & mousewheel.js v3.1.3
bencooling opened this issue · comments
Cannot scroll with mousewheel for
jscrollpane v2.0.14 & mousewheel.js v3.1.3
in
ie8 & ie7.
The positionDragY function is being called by the plugin, but the destY argument passed to it is NaN, when it should be an integer.
I just updated the mousewheel plugin which could have caused this. Some questions (I don't have access to IE here):
- Are you using the mwheelintent plugin as well? (if so then try without and see if it helps)
- Does the mousewheel plugin work as expected in your IEs (e.g. what are the values of deltaX and deltaY in the listener function if you have some code like:
$('#my_elem').bind('mousewheel', function(event, delta, deltaX, deltaY) {
console.log(delta, deltaX, deltaY);
});
Thanks!
Hi vitch, after your most recent changes the mousewheel event isn't firing in ie7 & ie8 at all (I used your code snippet in the comment above. ie9 logged fine but ie8 & ie7 did not log to console). Ill try again tomorrow with the pre-changes, as I thought the mousewheel was firing - but Ill get back to confirm.
According to this issue #53 on the mousewheel plugin github page, deltaX and deltaY are unavailable in ie8.
I have submitted a pull request to the jquery-mousewheel repo that addresses this issue in ie8 for vertical scrolling, bringing it inline with ie9 behaviour jquery/jquery-mousewheel#65
@bencooling thank you for the vertical scrolling fix, i've confirmed it works in ie8
Hi bencooling, thanks for the fix.
It was however moving x and y at the same time...
Here is the fixed version:
try {
event.originalEvent.hasOwnProperty('wheelDelta');
}
catch(e) {
deltaY = delta;
}
Thanks mooshben, completely ignored horizontal scrollbars!
Sorry this was a mistaken in the mouse wheel plugin but is now resolved in 3.1.6
Thanks @brandonaaron :)