Jump to content

Windows Phone swipe problem

Tom Atom

Recommended Posts

Hi, I have problem with swipes on Windows Phone. In our game characters are moved with swipes. It works well on all devices except Windows Phone. On Windows Phone whole canvas is moved when you try to make a swipe.


 I googled and added "-ms-touch-action: none;" to body style in css and also to div element that holds canvas in index.html (<div id="content" style="overflow: hidden; -ms-touch-action: none;"></div>). Unfortunately, I do not have WP available to test on. The person that encountered problem says, that problem is still there.


 I would like to ask: did you encountered this? And if yes, what was your solution?

Link to comment
Share on other sites

Ok, I found the solution. It has nothing to do with my code inside game. The root of evil is this line:

<meta http-equiv="X-UA-Compatible" content="chrome=1, IE=9">

 If you have this line in your html file and run game on Lumia (currently tested on Lumia 532) it will display small gray circle on every tap and if you swipe, it will do things like browsing to previous page...


 Change it to:

<meta http-equiv="X-UA-Compatible" content="chrome=1, IE=Edge">

... and your game will behave well - no graphical tap response, no gestures sent to browser.

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...