magento2: [2.1.0] Problem on mobile when catalog gallery allowfullscreen is false

This is repost of #2818 since that one got closed due to incorrect bug report guidelines. I have the same issue.

Preconditions

  1. Magento 2.1.0 GA
  2. PHP 7.0.3
  3. MySQL 5.6
  4. Linux Mint
  5. Tested in browser: Chrome latest ( mobile view )

Steps to reproduce

  1. In theme’s view.xml, set gallery’s allowfullscreen variable to false.
  2. Flush cache and static files.
  3. Go to a product page with an image on a mobile touch capable device, or minimize the screen to mobile view in chrome. Tap on the image.

Expected result

  1. Nothing should happen when image is clicked since “allowfullscreen” is false.

Actual result

A white page ( the page-wrapper is hidden ).

image

I found that in lib/mage/gallery/gallery.js, even when allowfullscreen = false may be preventing the popup, code is still being executed that hides the page-wrapper.

if (this.isTouchEnabled) {
    this.settings.$element.on('tap', '.fotorama__stage__frame', function () {
        var translate = getTranslate($(this).parents('.fotorama__stage__shaft'));

        if (translate[1] === '0' && !$(this).hasClass('fotorama-video-container')) {
            self.openFullScreen();
            self.settings.$pageWrapper.hide();
        }
    });
}

Best case would probably be to check allowfullscreen prior to self.settings.$pageWrapper.hide();

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 32 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Give magic zoom a try. It’s a paid extension, but it works well. Fotorama has issues on mobile.

@ilol Is there any update/news on this issue? I have Fotorama issues as well for mobile users and would like to see it solved. I mean, it should be possible to figure something out in 4 months, right?