Jump to content

Issue with scrolling and touch events on mobile


Recommended Posts

I've been playing around with Panda.js using the example endless runner game avaialble here:


I've been having several issues trying to attempt to get the default scroll event working on mobile. I've modified the game in such a way as the user interacts with the game via DOM elements. As an example, I have a modal popup which they can click or tap to start the game, then when the game is over, enter their details via a similar modal with input fields etc. These modal boxes are rendered on top of the canvas element. The main issue comes as mentioned when I attempt to scroll on mobile, it seems I can't make any default browser action.

Edit: I have the canvas rendered inside a div content container.

I think this is primarily to do with pixi.js, and from doing some research into the issue have found some leads such as setting the autoPreventDefault attribute to false ( https://github.com/pixijs/pixi.js/issues/2410 ) but this has not helped, and the issue has remained. 

Has anyone come across a similar problem, and might have a solution? 



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...