Closed
Description
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:
- In theme's view.xml, set gallery's allowfullscreen variable to false.
- Flush cache and static files.
- 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();