Skip to content

Commit

Permalink
Merge pull request #716 from magento-gl/AC-7870
Browse files Browse the repository at this point in the history
#AC-7870::Product Video is not getting played on StoreFront-updated f…
  • Loading branch information
glo05363 committed Feb 7, 2023
2 parents ae7989b + d1c5ccf commit 70b2b23
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/web/fotorama/fotorama.js
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ fotoramaVersion = '4.6.4';

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

/**
Expand Down Expand Up @@ -1219,6 +1219,7 @@ fotoramaVersion = '4.6.4';
}

function stopEvent(e, stopPropagation) {
e.preventDefault ? e.preventDefault() : (e.returnValue = false);
stopPropagation && e.stopPropagation && e.stopPropagation();
}

Expand Down Expand Up @@ -1518,7 +1519,7 @@ fotoramaVersion = '4.6.4';
addEvent(el, 'touchmove', onMove);
addEvent(el, 'touchend', onEnd);

addEvent(document, 'touchstart', onOtherStart);
addEvent(document, 'touchstart', onOtherStart, true);
addEvent(document, 'touchend', onOtherEnd);
addEvent(document, 'touchcancel', onOtherEnd);

Expand Down

0 comments on commit 70b2b23

Please sign in to comment.