From abcd59d9e2012798e087514493760e1ecaf3c821 Mon Sep 17 00:00:00 2001 From: Samuel Sloniker Date: Sat, 17 Jul 2021 16:34:39 -0700 Subject: [PATCH] Fix Chrome click bug This should fix the Chrome click bug. --- client/js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/js/main.js b/client/js/main.js index 437ad22..a806c1c 100644 --- a/client/js/main.js +++ b/client/js/main.js @@ -73,8 +73,8 @@ function touch(e) { function release(e) { - x = e.layerX - y = e.layerY + x = e.offsetX || e.layerX + y = e.offsetY || e.layerY w = displayWidth length = is_short?false:true ws.send('touch ' + x + ' ' + y + ' ' + w + ' ' + length)