On a website dedicated to mobile I’m preventing the user ability to scroll using the following code in document.ready:
document.body.addEventListener(‘touchstart’, function (e) {e.preventDefault(););
This works great but it has a side effect which prevents the user from interacting with input text fields, the text fields don’t respond.
I have tried adding a tap event to the one of the text fields but that didn’t work.
Any ideas on how to solve this one?
Thank you,
Moshe S.
Dont use touchstart, it is basically mobile click, use touchmove instead: