Prevents swiping when zoomed in (#37323)

This commit is contained in:
Echo 2025-12-19 17:18:50 +01:00 committed by GitHub
parent a0ce77673c
commit 4bae3da85c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -114,6 +114,11 @@ export const MediaModal: FC<MediaModalProps> = 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 &&