mirror of
https://github.com/photonstorm/phaser
synced 2024-11-15 17:28:18 +00:00
Disable context menu on input target instead of document.body
Fixes #6064
This commit is contained in:
parent
aa5f54cfa2
commit
b7a4b77a6a
2 changed files with 2 additions and 2 deletions
|
@ -284,7 +284,7 @@ var MouseManager = new Class({
|
|||
*/
|
||||
disableContextMenu: function ()
|
||||
{
|
||||
document.body.addEventListener('contextmenu', function (event)
|
||||
this.target.addEventListener('contextmenu', function (event)
|
||||
{
|
||||
event.preventDefault();
|
||||
return false;
|
||||
|
|
|
@ -209,7 +209,7 @@ var TouchManager = new Class({
|
|||
*/
|
||||
disableContextMenu: function ()
|
||||
{
|
||||
document.body.addEventListener('contextmenu', function (event)
|
||||
this.target.addEventListener('contextmenu', function (event)
|
||||
{
|
||||
event.preventDefault();
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue