diff --git a/web/src/lib/components/assets/thumbnail/thumbnail.svelte b/web/src/lib/components/assets/thumbnail/thumbnail.svelte index 077eb465a2..0dbbe718ee 100644 --- a/web/src/lib/components/assets/thumbnail/thumbnail.svelte +++ b/web/src/lib/components/assets/thumbnail/thumbnail.svelte @@ -72,7 +72,7 @@ IMAGE_THUMBNAIL: { THUMBHASH_FADE_DURATION }, } = TUNABLES; - let isTouchDevice = $derived(mobileDevice.hoverNone); + let usingMobileDevice = $derived(mobileDevice.pointerCoarse); let focussableElement: HTMLElement | undefined = $state(); let mouseOver = $state(false); let loaded = $state(false); @@ -112,7 +112,7 @@ }; const onMouseEnter = () => { - if (isTouchDevice) { + if (usingMobileDevice) { return; } mouseOver = true; @@ -191,7 +191,7 @@ onfocus={handleFocus} data-testid="container-with-tabindex" > - {#if !isTouchDevice && mouseOver && !disableMouseOver} + {#if !usingMobileDevice && mouseOver && !disableMouseOver} - {#if !isTouchDevice} + {#if !usingMobileDevice}
{ element?.scrollTo({ top }); diff --git a/web/src/lib/components/shared-components/scrubber/scrubber.svelte b/web/src/lib/components/shared-components/scrubber/scrubber.svelte index 734b42205e..0fdfa9c0da 100644 --- a/web/src/lib/components/shared-components/scrubber/scrubber.svelte +++ b/web/src/lib/components/shared-components/scrubber/scrubber.svelte @@ -268,7 +268,7 @@ globalThis.removeEventListener('touchmove', onTouchMove); }; }); - const usingMobileDevice = $derived(mobileDevice.hoverNone); + const usingMobileDevice = $derived(mobileDevice.pointerCoarse);