From 540b2e0a881f46601a69da52b43800d31d7a6782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sat, 26 Apr 2025 11:42:02 +0200 Subject: [PATCH] do not test for hover when checking touch device. --- client/src/components/video.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/client/src/components/video.vue b/client/src/components/video.vue index d6684e87..229eff57 100644 --- a/client/src/components/video.vue +++ b/client/src/components/video.vue @@ -367,12 +367,11 @@ get is_touch_device() { return ( - // check if the device has a touch screen + // detect if the device has touch support ('ontouchstart' in window || navigator.maxTouchPoints > 0) && - // we also check if the device has a pointer - !window.matchMedia('(pointer:fine)').matches && - // and is capable of hover, then it probably has a mouse - !window.matchMedia('(hover:hover)').matches + // the primary input mechanism includes a pointing device of + // limited accuracy, such as a finger on a touchscreen. + window.matchMedia('(pointer: coarse)').matches ) }