Skip to content

Commit 21610bd

Browse files
authored
fix(zoom): Ensure the zoom module's array is cleared onTouchEnd to fix #7304 (#7830)
1 parent c4619bb commit 21610bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/modules/zoom/zoom.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export default function Zoom({ swiper, extendParams, on, emit }) {
3232
const mousePanSensitivity = -3; // Negative to invert pan direction
3333
let fakeGestureTouched;
3434
let fakeGestureMoved;
35-
let preventZoomOut;
3635
const evCache = [];
3736
const gesture = {
3837
originX: 0,
@@ -391,6 +390,7 @@ export default function Zoom({ swiper, extendParams, on, emit }) {
391390
}
392391
function onTouchEnd() {
393392
const zoom = swiper.zoom;
393+
evCache.length = 0;
394394
if (!gesture.imageEl) return;
395395
if (!image.isTouched || !image.isMoved) {
396396
image.isTouched = false;

0 commit comments

Comments
 (0)