Skip to content

Commit

Permalink
Merge pull request #737 from dtinth/fix-context-menu
Browse files Browse the repository at this point in the history
  • Loading branch information
release-train[bot] committed Oct 30, 2021
2 parents 7aa4013 + dc82e00 commit 0d77823
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bemuse/src/game/game-scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ function showCanvas(display, container) {
var { view, wrapper } = display
var { width, height } = view
container.appendChild(wrapper)
container.addEventListener('touchstart', disableContextMenu)
function disableContextMenu() {
container.removeEventListener('touchstart', disableContextMenu)
container.addEventListener('contextmenu', (e) => {
e.preventDefault()
})
}

resize()
$(window).on('resize', resize)
Expand Down

0 comments on commit 0d77823

Please sign in to comment.