Skip to content

Commit

Permalink
Ensure the zoom module's array is cleared onTouchEnd to fix #7304
Browse files Browse the repository at this point in the history
  • Loading branch information
broox committed Dec 22, 2024
1 parent 488636f commit e321726
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/zoom/zoom.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export default function Zoom({ swiper, extendParams, on, emit }) {
let isScaling = false;
let fakeGestureTouched;
let fakeGestureMoved;
let preventZoomOut;
const evCache = [];
const gesture = {
originX: 0,
Expand Down Expand Up @@ -378,6 +377,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;
Expand Down

0 comments on commit e321726

Please sign in to comment.