diff options
| author | Fuwn <[email protected]> | 2026-05-20 12:15:31 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-05-20 12:15:31 +0000 |
| commit | 5bb94cc4c515bbab5b44b43a82dca42368671219 (patch) | |
| tree | 05001f3db0308717a30f017309f627c3c1b8946d /src | |
| parent | feat(a11y): rename Disable Page Transitions to Reduce Motion (diff) | |
| download | due.moe-5bb94cc4c515bbab5b44b43a82dca42368671219.tar.xz due.moe-5bb94cc4c515bbab5b44b43a82dca42368671219.zip | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/Tooltip/LinkedTooltip.svelte | 1 | ||||
| -rw-r--r-- | src/lib/Tooltip/tooltip.ts | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/Tooltip/LinkedTooltip.svelte b/src/lib/Tooltip/LinkedTooltip.svelte index 2a7961f5..4776322d 100644 --- a/src/lib/Tooltip/LinkedTooltip.svelte +++ b/src/lib/Tooltip/LinkedTooltip.svelte @@ -217,6 +217,7 @@ const hideTooltip = () => { const handleMouseEnter = (event: MouseEvent) => { if (disable) return; + if (window.matchMedia("(pointer: coarse)").matches) return; if (hideTimeout !== null) { clearTimeout(hideTimeout); diff --git a/src/lib/Tooltip/tooltip.ts b/src/lib/Tooltip/tooltip.ts index 3024bbff..830ff47f 100644 --- a/src/lib/Tooltip/tooltip.ts +++ b/src/lib/Tooltip/tooltip.ts @@ -108,6 +108,8 @@ const tooltip = (element: HTMLElement) => { }; const handleMouseEnter = (event: MouseEvent) => { + if (window.matchMedia("(pointer: coarse)").matches) return; + const title = element.getAttribute("title"); if (title) { |