Closed
Description
This is repost of #2818 since that one got closed due to incorrect bug report guidelines. I have the same issue.
Preconditions
- Magento 2.1.0 GA
- PHP 7.0.3
- MySQL 5.6
- Linux Mint
- Tested in browser: Chrome latest ( mobile view )
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, or minimize the screen to mobile view in chrome. Tap on the image.
Expected result
- Nothing should happen when image is clicked since "allowfullscreen" is false.
Actual result
A white page ( the page-wrapper is hidden ).
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();