From 3e57f87910bdfb82ea3ed1ade93e371439b6780b Mon Sep 17 00:00:00 2001 From: Ivan Gerchak Date: Fri, 29 Nov 2019 12:25:31 +0200 Subject: [PATCH] Fix gallery thumbs navigation scrolling --- lib/web/fotorama/fotorama.js | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/lib/web/fotorama/fotorama.js b/lib/web/fotorama/fotorama.js index ddf5a7f000d8e..7bae5198a7a93 100644 --- a/lib/web/fotorama/fotorama.js +++ b/lib/web/fotorama/fotorama.js @@ -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 ? '>' : '<'; } @@ -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'; @@ -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;