Skip to content

Commit

Permalink
Disable right clicks on canvas (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxammann authored Oct 20, 2023
1 parent 8b3c9ef commit 095d5fb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions web/lib/src/canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ export const preventDefaultTouchActions = () => {
document.body.querySelectorAll("canvas").forEach(canvas => {
canvas.addEventListener("touchstart", e => e.preventDefault())
canvas.addEventListener("touchmove", e => e.preventDefault())
canvas.addEventListener("contextmenu", e => e.preventDefault())
})
}

0 comments on commit 095d5fb

Please sign in to comment.