From 4bae3da85c8ee935539aacc92429bdb55aaf145e Mon Sep 17 00:00:00 2001 From: Echo Date: Fri, 19 Dec 2025 17:18:50 +0100 Subject: [PATCH] Prevents swiping when zoomed in (#37323) --- .../mastodon/features/ui/components/media_modal.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/javascript/mastodon/features/ui/components/media_modal.tsx b/app/javascript/mastodon/features/ui/components/media_modal.tsx index daa0aebeb3..ac762aa18d 100644 --- a/app/javascript/mastodon/features/ui/components/media_modal.tsx +++ b/app/javascript/mastodon/features/ui/components/media_modal.tsx @@ -114,6 +114,11 @@ export const MediaModal: FC = forwardRef< const bind = useDrag( ({ active, movement: [mx], direction: [xDir], cancel }) => { + // Disable swipe when zoomed in. + if (zoomedIn) { + return; + } + // If dragging and swipe distance is enough, change the index. if ( active &&