1

I'm having an issue with my magento 2.1 installation, basically when I go mobile, on the product page, I can't scroll down because of the product Image, I can just slide it, to scroll to bottom I need to take it from the very button, but I can't tell to do that to the users. Any suggestion?

0

here is a workaround for this bug which solves the problem from "Simpsonight",

at first copy /lib/web/fotorama/fotorama.js

to your theme in web folder /app/design/frontend/<package>/theme>/web/fotorama/fotorama.js

and change function onMove(e) at Line 1418 with this code:

function onMove(e) {
            if ((e.touches && e.touches.length > 1)
                || (MS_POINTER && !e.isPrimary)
                || moveEventType !== e.type
                || !touchEnabledFLAG) {
                touchEnabledFLAG && onEnd();
                (options.onTouchEnd || noop)();
                return;
            }

            extendEvent(e);

            var xDiff = Math.abs(e._x - startEvent._x), // opt _x → _pageX
                yDiff = Math.abs(e._y - startEvent._y),
                xyDiff = xDiff - yDiff,
                xWin = (tail.go || tail.x || xyDiff >= 0) && !tail.noSwipe,
                yWin = xyDiff < 0;


            if (touchFLAG && !tail.checked) {
              if (touchEnabledFLAG = xWin) {
                stopEvent(e);
              }
            } else {
                stopEvent(e);
                (options.onMove || noop).call(el, e, {touch: touchFLAG});
            }

            if (!moved && Math.sqrt(Math.pow(xDiff, 2) + Math.pow(yDiff, 2)) > tolerance) {
                moved = true;
            }

            tail.checked = tail.checked || xWin || yWin;
        }
0

Make the following changes in lib/web/fotorama/fotorama.js. Set "merge Javascript files","Enable javascript bundling" and "minify javascript files" to "No" In stores > configuration > advanced > developer

Of course flush all the caches after uploading the changed fotorama.js

             xWin = (tail.go || tail.x || xyDiff >= 0) && !tail.noSwipe,
             yWin = xyDiff < 0;

-            stopEvent(e);
-            (options.onMove || noop).call(el, e, {touch: touchFLAG});
+            if (touchFLAG && !tail.checked) {
+                if (touchEnabledFLAG = xWin) {
+                    stopEvent(e);
+                }
+            } else {
+                stopEvent(e);
+                (options.onMove || noop).call(el, e, {touch: touchFLAG});
+            }

         if (!moved && Math.sqrt(Math.pow(xDiff, 2) + Math.pow(yDiff, 2)) > tolerance) {
             moved = true;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.