Problems getting scroll events in Chrome on a touchscreen laptop

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

2 Likes

Same issue as I described in the other thread.

It is with touchscreen laptops using Chrome.

The issue is that at each Ionic update, we have to search and edit the ionic bundle event handling for touch/mouse events.

There may be other issues we aren’t seeing by deactivating mouse click events for Mouse OR Touch events.

Here’s a pastebin with our edited bundle: http://pastebin.com/cckqmvUC

Would love any comments/suggestions. You can find our edits by doing a search for a CHANGE token throughout the file.

Hey, I would be happy to try this as I’m having this issue, but your edited bundle seem to be truncated and not usable.