Fix Firefox touch event undefined: For Firefox compatibility
This commit is contained in:
parent
4bb319e1ec
commit
eb264553e9
BIN
favicon.ico
Normal file
BIN
favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
4
game.js
4
game.js
@ -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…
x
Reference in New Issue
Block a user