aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Buttons.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-04-06 21:47:29 +0300
committerRblSb <msrblsb@gmail.com>2020-04-06 21:47:29 +0300
commit4c955af4c4be0d3c1d002a867c89166811373a9f (patch)
tree06f7e23824b976f5c7b5907fa64e06321f1810d0 /src/client/Buttons.hx
parentbda198c729ba65905bc34d15b44eb51f8336a8ff (diff)
Skip item confirmation for touch
Diffstat (limited to 'src/client/Buttons.hx')
-rw-r--r--src/client/Buttons.hx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/client/Buttons.hx b/src/client/Buttons.hx
index 63934e2..2d32d99 100644
--- a/src/client/Buttons.hx
+++ b/src/client/Buttons.hx
@@ -210,8 +210,7 @@ class Buttons {
}
static function onClick(el:Element, func:Any->Void):Void {
- final isTouch = untyped __js__("'ontouchstart' in window");
- if (!isTouch) el.onclick = func;
+ if (!Utils.isTouch()) el.onclick = func;
else el.ontouchend = func;
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage