From 21610bde1d6537102fdcec62b86f2f2e0794540c Mon Sep 17 00:00:00 2001 From: Derek Brooks Date: Thu, 2 Jan 2025 11:52:22 -0600 Subject: [PATCH] fix(zoom): Ensure the zoom module's array is cleared onTouchEnd to fix #7304 (#7830) --- src/modules/zoom/zoom.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/zoom/zoom.mjs b/src/modules/zoom/zoom.mjs index 2279b5c92..d23b7830d 100644 --- a/src/modules/zoom/zoom.mjs +++ b/src/modules/zoom/zoom.mjs @@ -32,7 +32,6 @@ export default function Zoom({ swiper, extendParams, on, emit }) { const mousePanSensitivity = -3; // Negative to invert pan direction let fakeGestureTouched; let fakeGestureMoved; - let preventZoomOut; const evCache = []; const gesture = { originX: 0, @@ -391,6 +390,7 @@ export default function Zoom({ swiper, extendParams, on, emit }) { } function onTouchEnd() { const zoom = swiper.zoom; + evCache.length = 0; if (!gesture.imageEl) return; if (!image.isTouched || !image.isMoved) { image.isTouched = false;