Skip to content
This repository

Using Overthrow and also disabling body scroll? #17

Open
dagjomar opened this Issue August 21, 2012 · 1 comment

2 participants

Dag Jomar Mersland FONTAINE Cédric
Dag Jomar Mersland

I am using

document.addEventListener("touchmove", preventBehavior, false);

to prevent the body page to scroll on a mobile device, such as iPhone, because it's a fullscreen one-page app. However, I want to be able to scroll on some elements containing text.

However, when preventing all touchmove events on document, none of the overthrow elements work. So far, I was able to make it work in some instances by checking the e.target.className and see if the element has "overthrow" as a class, and then NOT preventing the touchmove event. However, that doesn't work if I am trying to scroll when touching any other element inside the overthrow element.... :/

Is there a good way to get both things working?

FONTAINE Cédric

A bit (lot) late but I also check parent(s) and it works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.