Monster9800 Posted March 18, 2017 Report Share Posted March 18, 2017 Hi, I'm beginner in html5 game development. Last time I've got a problem. I tested my first game on the phone and if I hold finger on the screen, automatically creates a menu with option: Select All. How can i solving my problem? Quote Link to comment Share on other sites More sharing options...
mattstyles Posted March 18, 2017 Report Share Posted March 18, 2017 Check out blanket applying `user-select: none`. user-select. Quote Link to comment Share on other sites More sharing options...
Monster9800 Posted March 21, 2017 Author Report Share Posted March 21, 2017 Hi, Thanks for answer but my problem has been. I can't solve it Quote Link to comment Share on other sites More sharing options...
mattstyles Posted March 21, 2017 Report Share Posted March 21, 2017 What platform are you trying to support? It's works almost everywhere and I've used it a few times without issue. Quote Link to comment Share on other sites More sharing options...
Monster9800 Posted March 21, 2017 Author Report Share Posted March 21, 2017 I tested on Android and it's ok, but Windows Phone show option: Select All Quote Link to comment Share on other sites More sharing options...
bruno_ Posted March 21, 2017 Report Share Posted March 21, 2017 I didn't test it because I don't have a windows phone, but cordova adds this to the html template (inside head): <meta name="msapplication-tap-highlight" content="no"> See if it works. Quote Link to comment Share on other sites More sharing options...
samme Posted March 21, 2017 Report Share Posted March 21, 2017 Phaser automatically sets touch-action: none and user-select: none on the game canvas. I guess it's possible that device doesn't support it. Quote Link to comment Share on other sites More sharing options...
mattstyles Posted March 21, 2017 Report Share Posted March 21, 2017 According to caniuse.com it should work with windows phone (they use Edge or older ones use IE 10/11 right?) but its quite possible that if its an older phone then compatibility isn't what it should be and Windows Phone isn't well supported as user stats are tiny, particularly for older phones. How are you currently testing it? Is it via the browser or in a wrapper like cordova? Which browser version is it? You could try checking MSDN to see if anyone has come across the issue for your specific device/browser combination? Quote Link to comment Share on other sites More sharing options...
Monster9800 Posted March 25, 2017 Author Report Share Posted March 25, 2017 Ok, I solved my problem. I added a jQuery file and script: $('body').on('contextmenu', 'canvas', function(e){ return false; }); Can you change status of the question to a resolved one? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.