From 83556188f50f10e9bced41fb9337584e377cdb35 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sat, 29 Aug 2026 00:46:53 +0200 Subject: [PATCH] fix: hide file preview zoom buttons on touch devices (#29176) On a phone the file preview zoom bar shows plus and minus buttons that duplicate pinch-to-zoom and sit on top of an already small preview. They are hidden on coarse pointers now, so touch users get the preview area back and still zoom the way they expect. The check is the pointer type rather than the viewport width, because what matters is whether the person can pinch, not how narrow their window is. A narrow desktop window keeps the buttons, a tablet does not. The zoom percentage doubles as the reset control and has no gesture equivalent, so it stays visible, along with all page and slide navigation. Keyboard zoom is unaffected. Word document previews are left alone: they have no pinch support at all, so hiding their buttons would remove zooming entirely. Fixes #29152 --- src/lib/components/chat/FileNav/FilePreview.svelte | 5 +++-- src/lib/components/common/PDFViewer.svelte | 5 +++-- src/lib/components/common/PptxPreview.svelte | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/lib/components/chat/FileNav/FilePreview.svelte b/src/lib/components/chat/FileNav/FilePreview.svelte index aa457e56b2..90c984e729 100644 --- a/src/lib/components/chat/FileNav/FilePreview.svelte +++ b/src/lib/components/chat/FileNav/FilePreview.svelte @@ -515,9 +515,10 @@
+ {/if} + +