From 9569969b55639dcd30c53a99212f2feeb1f20a71 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 5 Jul 2024 10:20:33 -0400 Subject: [PATCH] Fix distance calculation in picker Related issue: https://github.com/uBlockOrigin/uBlock-issues/issues/3279 --- src/js/epicker-ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/epicker-ui.js b/src/js/epicker-ui.js index 981602b66..d2b14df65 100644 --- a/src/js/epicker-ui.js +++ b/src/js/epicker-ui.js @@ -386,7 +386,7 @@ const onSvgTouch = (( ) => { const stopY = ev.changedTouches[0].screenY; const angle = Math.abs(Math.atan2(stopY - startY, stopX - startX)); const distance = Math.sqrt( - Math.pow(stopX - startX, 2), + Math.pow(stopX - startX, 2) + Math.pow(stopY - startY, 2) ); // Interpret touch events as a tap if: