From 943f0e942aa929579590374c92986adc623758e7 Mon Sep 17 00:00:00 2001 From: integralfunction <83551660+integralfunction@users.noreply.github.com> Date: Sun, 22 Mar 2026 15:28:18 -0400 Subject: [PATCH 1/2] Fix touchpad zooming in image viewer --- src/app/components/image-viewer/ImageViewer.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/components/image-viewer/ImageViewer.tsx b/src/app/components/image-viewer/ImageViewer.tsx index e08430f1c..569b61df1 100644 --- a/src/app/components/image-viewer/ImageViewer.tsx +++ b/src/app/components/image-viewer/ImageViewer.tsx @@ -25,8 +25,15 @@ export const ImageViewer = as<'div', ImageViewerProps>( }; const handleWheel = (e: WheelEvent) => { - if (e.deltaY < 0) zoomIn(); - else zoomOut(); + const { deltaY } = e; + // Mouse wheel scrolls only by integer delta values, therefore + // If deltaY is an integer, then it's a mouse wheel action + if (Number.isInteger(deltaY)) { + if (deltaY < 0) { + zoomIn(); + } else zoomOut(); + } + // If it's not an integer, then it's a touchpad action, do nothing and let the browser handle the zooming }; return ( From d9924e2ad4da08fbfb5974e9f7596b71c43771fc Mon Sep 17 00:00:00 2001 From: integralfunction <83551660+integralfunction@users.noreply.github.com> Date: Sun, 22 Mar 2026 15:43:05 -0400 Subject: [PATCH 2/2] add changeset --- .changeset/fixes_touchpad_zooming_behaviour.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fixes_touchpad_zooming_behaviour.md diff --git a/.changeset/fixes_touchpad_zooming_behaviour.md b/.changeset/fixes_touchpad_zooming_behaviour.md new file mode 100644 index 000000000..da2040bf1 --- /dev/null +++ b/.changeset/fixes_touchpad_zooming_behaviour.md @@ -0,0 +1,5 @@ +--- +default: minor +--- + +# fixes touchpad zooming behaviour