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
- 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();
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 32 (6 by maintainers)
Commits related to this issue
- [2.1.0] Problem on mobile when catalog gallery allowfullscreen is false #5808 — committed to Crossmotion/magento2 by Crossmotion 7 years ago
- MAGETWO-64250: [GitHub][PR] magento/magento2 #8434 Problem on mobile when catalog gallery allowfullscreen is false #5808 — committed to magento/magento2 by deleted user 7 years ago
- Merge pull request #5808 from magento-tsg/2.3.6-develop-pr138 [TSG] Fixes for 2.3 (pr138) (2.3.6-develop) — committed to magento/magento2 by zakdma 4 years ago
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?