bug: Mousewheel scrolling broken on Firefox and Chrome on devices with touch support
Type: bug
Platform: desktop browser
Try scrolling the following pen (taken from the official docs: http://ionicframework.com/docs/api/directive/ionList/) on Firefox (Dev Edition 41.0a2) or Chrome (Stable 44.0.2403.130): http://codepen.io/ionic/pen/JsHjf
In Firefox, scrolling is extremely slow, while in Chrome, it doesn't work at all (can't even drag with the mouse).
Not seeing this at all. Scrolling is working fine in chrome and firefox for me.
Here's a quick update:
This seems to only happen on devices with touch support. Tried it on my desktop and couldn't repro it. And then tested on 3 different windows tablets/hybrids (including 1 fresh windows 10 install to isolate software conflicts) and all of them exhibit the issue.
Well good thing we're not supporting Windows at the moment :grin:
Currently windows has known issues, but we're waiting a bit on window. Market share is really there ATM and with windows 10 coming out, we're waiting to see how that works.
Thanks for the quick follow up.
I don't think this issue is limited to Windows though. As a quick test, I connected a mouse to my Android phone and tried to mousewheel scroll in Ionic View's Terms of Service page. Same problem there.
So it looks like mousewheel scrolling might be broken on any Windows or Android device with touch support. Granted, using a mouse with Android is a fairly rare use case, so I'd understand if you guys would rather label this as a Windows issue anyways. =)
+1
OSX's Firefox scrolling is really slow, @mhartington have you tried recently?
OSX: 10.11 Firefox: 42.0
Scroll here:
http://codepen.io/ionic/pen/JsHjf
@schoettler I had some luck setting overflow-scroll="true" for getting the mousewheel to work in firefox. This will break touch scroll for iOS though so you'll have to set this based on the platform/device being used. You can also set this application wide using $ionicConfigProvider.scrolling.jsScrolling(false). Hope this helps.
I have created a decorator to change the wheelDampen to a lower value if the browser is Firefox. It's not a beautiful solution, but it works.
$controllerDecorator.$inject = ['$delegate'];
function $controllerDecorator ($delegate) {
return function (constructor, locals) {
if ('$ionicScroll' === constructor && isFirefox) {
locals.scrollViewOptions.wheelDampen = 0.08;
}
return $delegate.apply(null, arguments);
}
}
My goal was to hook into the mouseWheel event in the ctrl.scrollView object but without success. This way there is no need for browser lookup and the event object can be used to determine if scroll velocity needs to be increased.
@ChristiaanScheermeijer I would like to try your solution but I do not fully understand what is decorated from your example? Could you clarify?
Also: Is there an ionic-built-in function for checking whether the browser isFirefox?
@qqilihq the $ionicScroll controller is being altered by using a $controller decorater.
Unfortunately Ionic has no Firefox detection (that I'm aware of).
Thank you for your feedback! Got it :)
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.