Skip to content

Commit

Permalink
ENGCOM-6368: Fix gallery thumbs navigation scrolling #25839
Browse files Browse the repository at this point in the history
  • Loading branch information
slavvka authored Feb 7, 2020
2 parents 5a0f754 + c467773 commit c41b7cb
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions lib/web/fotorama/fotorama.js
Original file line number Diff line number Diff line change
Expand Up @@ -1220,22 +1220,6 @@ fotoramaVersion = '4.6.4';
stopPropagation && e.stopPropagation && e.stopPropagation();
}

function stubEvent($el, eventType) {
var isIOS = /ip(ad|hone|od)/i.test(window.navigator.userAgent);

if (isIOS && eventType === 'touchend') {
$el.on('touchend', function(e){
$DOCUMENT.trigger('mouseup', e);
})
}

$el.on(eventType, function (e) {
stopEvent(e, true);

return false;
});
}

function getDirectionSign(forward) {
return forward ? '>' : '<';
}
Expand Down Expand Up @@ -1538,10 +1522,10 @@ fotoramaVersion = '4.6.4';

$WINDOW.on('scroll', onOtherEnd);

$el.on('mousedown pointerdown', onStart);
$el.on('mousedown', onStart);
$DOCUMENT
.on('mousemove pointermove', onMove)
.on('mouseup pointerup', onEnd);
.on('mousemove', onMove)
.on('mouseup', onEnd);
}
if (Modernizr.touch) {
dragDomEl = 'a';
Expand Down Expand Up @@ -2183,11 +2167,6 @@ fotoramaVersion = '4.6.4';
if (o_allowFullScreen) {
$fullscreenIcon.prependTo($stage);
o_nativeFullScreen = FULLSCREEN && o_allowFullScreen === 'native';

// Due 300ms click delay on mobile devices
// we stub touchend and fallback to click.
// MAGETWO-69567
stubEvent($fullscreenIcon, 'touchend');
} else {
$fullscreenIcon.detach();
o_nativeFullScreen = false;
Expand Down

0 comments on commit c41b7cb

Please sign in to comment.