-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vertically scrollable content breaks panning in Chrome 55 (Android and desktop) #1056
Comments
Apparently new chrome fires touchcancels relentlessly. |
I ended up just writing my own carousel without Hammer 😕 For anyone interested, here's the code |
It also breaks swiping |
I have downgraded to 2.0.6 and it works fine on Chrome (tools+Android) |
I'm still having issues after the downgrade |
I checked it and played a bit with Hammer code. |
+1 |
@mscelina you made my day - Thanks! |
+1 |
@Shuky How you disable it ? |
I was in a hurry to fix so I just edited the hammer.js script locally and changed line 384 to be: Solved all my troubles for now, but hoping this can be addressed in the upcoming versions |
Hammer team, any plan to fix it? |
Specifying the Seems to fix up the pen from the original issue as well. Only works on touch devices now, so depends what support is needed ... |
@cmdickson thanks a lot, works for me since I need only touch devices support! :) |
@cmdickson Thank you 👍 |
Based on @cmdickson 's solution, in angular 2+ you wanna do something like this:
and then in your module providers:
|
@larssn Thanks for this worked a charm. I did however add a check in the buildHammer function to see if the UserAgent was Android. buildHammer(element: HTMLElement) {
if ( navigator.userAgent.match(/Android/i) ) {
return new Hammer(element, {
inputClass: Hammer.TouchInput,
touchAction: 'pan-y'
});
} else {
return new Hammer(element);
}
} |
Above does not work with MS Edge browser. Pan stops working. |
const hammer = new Hammer(input, {
inputClass: Hammer.TouchMouseInput,
}); This improved solution seems to fix the problem for both touch and mouse devices |
If the hammer'd element has vertically scrollable content, the pan event seems to break (more specifically,
event.deltaX
has unexpected values). This seems to be broken as of Chrome 55,a affecting both the Android version and reproducible on touch-enabled laptops or with the DevTools touch emulator. This issue could be related to / a duplicate of #1050.Example specimen: http://codepen.io/anon/pen/oYRQgM
Repro steps:
Screencap:
The text was updated successfully, but these errors were encountered: