Neso Posted April 20, 2015 Share Posted April 20, 2015 Hi, By chance I have discovered that in system.js there is piece of code that actually preventsDefault behaviour for the touchstart. Does anyone know why is this there?document.addEventListener('touchstart', function(e) { e.preventDefault();}, false);Thanks. Quote Link to comment Share on other sites More sharing options...
enpu Posted April 20, 2015 Share Posted April 20, 2015 That is removed from current develop branch. Quote Link to comment Share on other sites More sharing options...
SkyzohKey Posted April 20, 2015 Share Posted April 20, 2015 preventDefault() is a basic Javascript function to stop the propagation of an event. You can use it anywhere in javascript, even in PandaJS ^^'this.sprite.click = this.sprite.touch = function (event){ event.preventDefault();};^^' EDIT: Ok i'm stupid, I thought that system.js was a javascript framework, not thought a few second that you could speak about the system.js file xD Quote Link to comment Share on other sites More sharing options...
Neso Posted April 21, 2015 Author Share Posted April 21, 2015 That is removed from current develop branch. Is there any specific reason this was there? I've commented it out in order to be able to go to fullscreen mode on iOS devices. Or was there different workaround to go to fullscreen on iOS devices. Quote Link to comment Share on other sites More sharing options...
enpu Posted April 21, 2015 Share Posted April 21, 2015 game.fullscreen(); should request fullscreen mode. Quote Link to comment Share on other sites More sharing options...
Neso Posted April 21, 2015 Author Share Posted April 21, 2015 That isn't supported on iOS devices as far as I know. It needs to be user interaction that pushes the bars off the screen. And current docs suggest it isn't even implemented. https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode Quote Link to comment Share on other sites More sharing options...
enpu Posted April 21, 2015 Share Posted April 21, 2015 Yes Full Screen API is not supported on iOS Safari. Quote Link to comment Share on other sites More sharing options...
Neso Posted April 21, 2015 Author Share Posted April 21, 2015 I have solution implemented with overlaying div. which allows you to drag it so that browser goes to minimal mode and then it disappears. Do you have any other solution in mind? 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.