Disable context menu on input target instead of document.body

Fixes #6064
This commit is contained in:
Lukas Hass 2022-04-02 23:57:15 +02:00
parent aa5f54cfa2
commit b7a4b77a6a
No known key found for this signature in database
GPG key ID: 7C8CEF72C4039178
2 changed files with 2 additions and 2 deletions

View file

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

View file

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