I've got an InDesign magazine which contains a Web Content Overlay (pointing to a responsive web site). Everything works fine apart from when it comes to scrolling.
Only vertical scrolling (up and down) is required, horizontal isn't.
Problem
When the user swipes left or right, the magazine's page changes and the web content closes.
Question
Is there any way that I can prevent scroll events from propagating up to the magazine from the web content overlay? Preferably, this would be done from the web content itself (e.g. using JavaScript) as it would mean I would only have to edit in one place, rather than on each page the web content is shown.
Attempted
- Catching the
touchmove
event on the page's body and callingstopPropagation()
on it. - Calling
preventDefault()
on the event (this stops any scrolling at all). - Using pageX on
touchmove
events and callingpreventDefault()
on any ones that look to be horizontal swipes (too unreliable). - Using CSS
overflow-x: hidden
- jQuery Mobile's custom scroll events.
- A few more combinations of the above.