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.

Chart prevents vertical scroll on touch devices

See original GitHub issue

I was unable to create a chart that would scroll horizontally on iOS, yet wouldn’t prevent user from scrolling the page vertically. The chart captures touch events and doesn’t let them through.

I expected that one of the following options would have worked for me, but neither did:

handleScroll: {
  pressedMouseMove: false
}

// Nope, disables all scroll on touch devices

OR

handleScale: {
  mouseWheel: false
}

// Nope, still captures vertical scroll on touch devices

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
onur-celikcommented, May 20, 2021

Hey @timocov what I am trying to do is actually same with this page. If you open this url on a mobile device ( I’ve checked both iOs and Android devices ) https://tr.tradingview.com/symbols/BIST-GARAN/ you will see that user is available to scroll page down touching right over the chart. But I could not make the same thing. Even I set both handleScroll and handleScale to false, you can not scroll the page up or down if the chart cover all over the screen.

1reaction
vladmorozcommented, Apr 22, 2021

@onur-celik Sorry, this was a while ago and I don’t remember. Not working on anything that uses this package currently.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prevent vertical mobile scrolling on predominantly horizontal ...
If I understood it correctly, you need to STOP VERTICAL SCROLL (which is unintended) when user is scrolling (or trying to) horizontally.
Read more >
CSS: Overscroll, Overflow & Touch Actions.
overscroll-behavior: contain; This will prevent scrolling on underlying elements. overscroll-behavior: none; The default behavior is prevented ...
Read more >
-webkit-overflow-scrolling - CSS: Cascading Style Sheets | MDN
The -webkit-overflow-scrolling CSS property controls whether or not touch devices use momentum-based scrolling for a given element.
Read more >
How to disable scrolling temporarily using JavaScript
The window.onscroll event fires when the window has been scrolled. Overriding this function and setting it to a fixed position every time ...
Read more >
Documentation: DevExtreme - JavaScript Data Grid Scrolling
Specifies whether to render rows after a user stops scrolling or at the same time as the user scrolls the ... Default Value:...
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