From a801862ef063add337da157e7fecdadf5bf96ab8 Mon Sep 17 00:00:00 2001 From: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com> Date: Wed, 21 Jan 2026 11:21:24 -0800 Subject: [PATCH] Fix lightbox image zoom on click --- ts/components/Lightbox.dom.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ts/components/Lightbox.dom.tsx b/ts/components/Lightbox.dom.tsx index 05026db6fa..5c175ef8d5 100644 --- a/ts/components/Lightbox.dom.tsx +++ b/ts/components/Lightbox.dom.tsx @@ -67,6 +67,10 @@ const INITIAL_IMAGE_TRANSFORM = { scale: 1, translateX: 0, translateY: 0, +}; + +const IMAGE_SPRING_PROPS = { + from: INITIAL_IMAGE_TRANSFORM, config: { clamp: true, friction: 20, @@ -368,7 +372,7 @@ export function Lightbox({ }, [isViewOnce, isAttachmentGIF, onTimeUpdate, playVideo, videoElement]); const [{ scale, translateX, translateY }, springApi] = useSpring( - () => INITIAL_IMAGE_TRANSFORM + () => IMAGE_SPRING_PROPS ); const thumbnailsMarginInlineStart =