ritzbitz01 Posted June 14, 2014 Share Posted June 14, 2014 I have just started using the phaser framework and was wondering how do I capture the right click event such that the menu doesn't pop up in my browser. I would like to handle the right click event in my game and prevent the event from propogating up to the browser. Thanks. Link to comment Share on other sites More sharing options...
ragnarok Posted June 14, 2014 Share Posted June 14, 2014 try to put something like the following in your create-function:game.canvas.oncontextmenu = function (e) { e.preventDefault(); } You might want to look here (and in the sourcode of the linked example) as well:http://www.html5gamedevs.com/topic/6978-rightclick-and-leftclick-how-to-get-the-mouse-buttons-and-add-ondownonup-events/ Manifest 1 Link to comment Share on other sites More sharing options...
ritzbitz01 Posted June 15, 2014 Author Share Posted June 15, 2014 That worked perfectly! Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts