From 361d71d06dfeec95dccd4f32b455962873fa2c60 Mon Sep 17 00:00:00 2001 From: Shahar Marcus <88977041+ShaharMS@users.noreply.github.com> Date: Sat, 1 Oct 2022 12:51:36 +0300 Subject: [PATCH] On touch events, clickCount should not increase. --- src/lime/_internal/backend/html5/HTML5Window.hx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lime/_internal/backend/html5/HTML5Window.hx b/src/lime/_internal/backend/html5/HTML5Window.hx index 2b5cda031..13eac76cb 100644 --- a/src/lime/_internal/backend/html5/HTML5Window.hx +++ b/src/lime/_internal/backend/html5/HTML5Window.hx @@ -805,7 +805,10 @@ class HTML5Window if (touch == primaryTouch) { - parent.clickCount = event.detail; + // touches shouldn't raise clickCounts value + // but they also indicate the end of a click sequence + // (you expect click count to reset after you stop clicking with the mouse) + parent.clickCount = 0; parent.onMouseDown.dispatch(x, y, 0); } } @@ -842,7 +845,7 @@ class HTML5Window if (touch == primaryTouch) { - parent.clickCount = event.detail; + parent.clickCount = 0; parent.onMouseUp.dispatch(x, y, 0); primaryTouch = null; }