Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem on mobile when catalog gallery allowfullscreen is false #2818

Closed
tigerx7 opened this issue Dec 26, 2015 · 2 comments
Closed

Problem on mobile when catalog gallery allowfullscreen is false #2818

tigerx7 opened this issue Dec 26, 2015 · 2 comments

Comments

@tigerx7
Copy link

tigerx7 commented Dec 26, 2015

When passing false to allowfullscreen via the theme's view.xml successfully deactivates the full screen feature of the product's gallery, on mobile devices (or touch capable), top level .page-wrapper is still hidden rendering a blank page upon tapping the image.

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. Tap on the 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.

/lib/web/mage/gallery/gallery.js line 129-138

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();

@palamar
Copy link
Contributor

palamar commented Jun 22, 2016

@tigerx7
Please, provide the used version. If the problem is actual for a specific tag, please, specify it and be sure that the latest update was used.

@palamar
Copy link
Contributor

palamar commented Jul 7, 2016

According to contributor guide, tickets without response for two weeks should be closed.
Please feel free to reopen if it's needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants