Fix Firefox touch event undefined: For Firefox compatibility

This commit is contained in:
sigonasr2 2020-09-07 18:47:54 +09:00
parent 4bb319e1ec
commit eb264553e9
2 changed files with 2 additions and 2 deletions

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -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()
}