question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vertically scrollable content breaks panning in Chrome 55 (Android and desktop)

See original GitHub issue

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:

  1. Pan horizontally in the ‘not vertically scrollable’ section. Observe that panning works as expected.
  2. Pan horizontally in the ‘vertically scrollable’ section. Observe that the content jumps around.

Screencap:

hammerjs-scroll-bug

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:14
  • Comments:19

github_iconTop GitHub Comments

30reactions
cmdicksoncommented, Jan 10, 2017

@bbialas

How you disable it ?

Specifying the inputClass to use worked in my case: let mc = new Hammer(el, { inputClass: Hammer.TouchInput });

Seems to fix up the pen from the original issue as well.

Only works on touch devices now, so depends what support is needed …

14reactions
Shukycommented, Jan 5, 2017

I was in a hurry to fix so I just edited the hammer.js script locally and changed line 384 to be: var SUPPORT_POINTER_EVENTS = false

Solved all my troubles for now, but hoping this can be addressed in the upcoming versions

Read more comments on GitHub >

github_iconTop Results From Across the Web

touch-action - CSS: Cascading Style Sheets - MDN Web Docs
Once scrolling has started, the direction may still be reversed. Note that scrolling "up" (pan-up) means that the user is dragging their finger ......
Read more >
hammerjs - Bountysource
Vertically scrollable content breaks panning in Chrome 55 (Android and desktop) ... If the hammer'd element has vertically scrollable content, the pan event ......
Read more >
Javascript: Any workarounds for getting Chrome for Android to ...
Assuming that you want to intercept horizontal touch events and let vertical touch events cause panning/scrolling, a workaround would be: On touchstart ,...
Read more >
Take control of your scroll - customizing pull-to-refresh and ...
Turns out this behavior is called scroll chaining; the browser's default behavior when scrolling content. Oftentimes the default is pretty ...
Read more >
Scrolling with pleasure - Pavel Fatin
Accurate positioning. Even though large scrolling steps can be animated, there's no way to fixate the content between the steps. High-precision scrolling makes ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found