Hi all,
We’ve been developing an ionic app for a while, and are on version 1.0.1 of the bundle. During testing, we’ve been noticing various issues scrolling within chrome. Sometimes switching between chrome’s mobile emulation window and back can cause our app to lock up and not process any mouse scroll events. It seems to be a bigger problem on touch screen laptops, where mouse scrolling (touch scrolling too) doesn’t work at all, in any state.
We’ve narrowed this down to chrome defining events for ‘ontouchstart’ on the window object. Apparently chrome defines this call in phone emulation and on touch-screen laptops. When that happens, ionic appears to only process touch events, not mouse events, which breaks mouse scrolling.
Our workaround, (hack?) was to go through the event handling in the ionic bundle, and in every place where we subscribe to touch OR mouse events, change it so that it subscribes to mouse events in every scenario. I would post code, but I’m not sure it would be very useful without context. It seems to fix the issue, and is still seems to work wherever else we can test it.
My main question is…Is there a better approach? I’d love to have a cleaner approach to this problem. I know that ionic only officially supports mobile devices and not browser applications, but the reality for us is that users will want to use their browsers too. I’m happy to post code with our changes if anyone think’s it’s useful.
Thanks for you help!
Kevin