Skip to content

Commit 274f5b0

Browse files
authored
Merge pull request #8115 from magento-gl/Arrows_regression_issues_3_feb_2023
Arrows regression issues 3 feb 2023
2 parents f993fea + 69de7db commit 274f5b0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/web/fotorama/fotorama.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ fotoramaVersion = '4.6.4';
11401140

11411141
function addEvent(el, e, fn, bool) {
11421142
if (!e) return;
1143-
el.addEventListener ? el.addEventListener(e, fn, {passive: true}) : el.attachEvent('on' + e, fn);
1143+
el.addEventListener ? el.addEventListener(e, fn, !!bool) : el.attachEvent('on' + e, fn);
11441144
}
11451145

11461146
/**
@@ -1219,6 +1219,7 @@ fotoramaVersion = '4.6.4';
12191219
}
12201220

12211221
function stopEvent(e, stopPropagation) {
1222+
e.preventDefault ? e.preventDefault() : (e.returnValue = false);
12221223
stopPropagation && e.stopPropagation && e.stopPropagation();
12231224
}
12241225

@@ -1518,7 +1519,7 @@ fotoramaVersion = '4.6.4';
15181519
addEvent(el, 'touchmove', onMove);
15191520
addEvent(el, 'touchend', onEnd);
15201521

1521-
addEvent(document, 'touchstart', onOtherStart);
1522+
addEvent(document, 'touchstart', onOtherStart, true);
15221523
addEvent(document, 'touchend', onOtherEnd);
15231524
addEvent(document, 'touchcancel', onOtherEnd);
15241525

0 commit comments

Comments
 (0)