eguneys Posted March 20, 2022 Share Posted March 20, 2022 I have this code to detect both left click and right click: this.pan_container.hitArea = Rectangle(0, 0, this.gw, this.gh) this.pan_container.interactive = true this.pan_container.on('pointerdown', on_pan_begin) this.pan_container.on('pointermove', on_pan_move) this.pan_container.on('pointerupoutside', on_pan_end) this.pan_container.on('pointerup', on_pan_end) Problem is right click opens up the context menu, which I do not want. I want right click event to preventDefault() so it doesn't open any context menu. I've seen this issue, I've tried setting both to true and false but I couldn't disable the right click context menu pop up. this.App.renderer.plugins.interaction.autoPreventDefault = false; this.App.renderer.view.style.touchAction = 'auto'; https://github.com/pixijs/pixijs/issues/4824 Quote Link to comment Share on other sites More sharing options...
Exca Posted March 21, 2022 Share Posted March 21, 2022 Try using "rightdown", "rightup", "rightclick" and see if those work. Or use a separate contextMenu listener on canvas and call preventDefault on that. 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.