Jump to content



Recommended Posts



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);




Link to comment
Share on other sites

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

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