Fix Firefox touch event undefined: For Firefox compatibility

master
sigonasr2 5 years ago
parent 4bb319e1ec
commit eb264553e9
  1. BIN
      favicon.ico
  2. 4
      game.js

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

@ -1514,7 +1514,7 @@ function setMoveMode(mode) {
} }
function clickEvent(e) { function clickEvent(e) {
if (e instanceof TouchEvent) { if (window.TouchEvent && e instanceof TouchEvent) {
MOBILE=true MOBILE=true
e.preventDefault() e.preventDefault()
} else { } else {
@ -1683,7 +1683,7 @@ function getGridCoords(pos) {
} }
function releaseEvent(e) { function releaseEvent(e) {
if (e instanceof TouchEvent) { if (window.TouchEvent && e instanceof TouchEvent) {
e.preventDefault() e.preventDefault()
} }

Loading…
Cancel
Save