jellyfin/jellyfin-web

Desktop PC with pen tablet is incorrectly detected as a touchscreen

ray-kast opened this issue · 0 comments

Connecting a tablet that supports Windows Ink causes navigator.maxTouchPoints > 0 to be true here which causes multiSelect.js to replace the right-click handler for item tiles with the long-tap handler here.

I have experienced this on both Firefox 126 and Brave 1.66 (Chromium 125) running on Windows 10 22H2.

I'm not sure what the browser compatibility target is, but using window.matchMedia with the interaction media features seems like it reports accurate results, Specifically, checking if (pointer: coarse) matches or (any-hover: hover) does not match seem to be more reliable. If this is a viable fix I can draft a PR to patch the check in browser.js with a check for (pointer: coarse).