Fix Firefox touch event undefined: For Firefox compatibility

master
sigonasr2 4 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) {
if (e instanceof TouchEvent) {
if (window.TouchEvent && e instanceof TouchEvent) {
MOBILE=true
e.preventDefault()
} else {
@ -1683,7 +1683,7 @@ function getGridCoords(pos) {
}
function releaseEvent(e) {
if (e instanceof TouchEvent) {
if (window.TouchEvent && e instanceof TouchEvent) {
e.preventDefault()
}

Loading…
Cancel
Save