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?
A bit (lot) late but I also check parent(s) and it works fine