Unable to scroll HTML after touching canvas (Game)?

  • Hello,

    "Can't scroll page after interacting with canvas on touch screen"

    My game lives in a <div> that on load fills the screen and I have other content that lives below the fold

    Issue is on mobile the user is unable to scroll down to the rest of the page. The touch events in canvas override the swipe down on mobile. However on desktop this works since a scroll wheel is used and not touch.

    My only idea so far is to just call a function from Construct attached to a swipe up/down action and then with javascript use ScrollTo and fake the page scroll. But I rather find a cleaner solution.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Solved:

    1. Create an empty <div> that spans and covers the entire game.

    2. Via CSS set

    html, body, canvas {

    touch-action: auto;

    }

    If you are also using "touch-action-delay: none;" comment it out.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)