From 4c955af4c4be0d3c1d002a867c89166811373a9f Mon Sep 17 00:00:00 2001 From: RblSb Date: Mon, 6 Apr 2020 21:47:29 +0300 Subject: Skip item confirmation for touch --- src/client/Buttons.hx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/client/Buttons.hx') 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; } -- cgit v1.2.3