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

Created on 26 Jul 2016  路  32Comments  路  Source: magento/magento2

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

  6. In theme's view.xml, set gallery's allowfullscreen variable to false.

  7. Flush cache and static files.
  8. 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

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

Frontend Fixed in 2.1.x Format is valid Ready for Work bug report

Most helpful comment

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

All 32 comments

This is the second bug that I have noticed that impacts customer experience on mobile. If you inadvertently tap the product image while attempting to scroll you basically render your site inaccessible until you refresh the page. @ilol any updates on this. TY

We have fixed #5302 (internal MAGETWO-55608 )
We will reproduce your present issue and then will fix it if it is reproducible.

@hyroniemus can you please share the link to your site. In PM if you want. Thanks

@peec , can you please share the link to your site (if it is live). In PM if you want. Thanks

Unable to send private messages, what about the email in your profile?

It works!

anyone fixed this bug?

The bug is fixed. Wait for mainline appearance

@ilol could you post the code to fix this bug like you done here https://github.com/magento/magento2/commit/7597a52dbf7179106b4ebba928dc04efbe6a8c78?

Sorry, mistake. The issue is nor fixed yes. This is tracking number: MAGETWO-59075

@ilol thx for update.
How could i visit your link? It seems that i can't access to it.

That is our internal system, I can`t grant access to you

yes i understand, hope you fix this early, thx

@ilol will a fix for this be present in the next release?

We can`t reproduce it

Using an android device this bug is still present. I haven't been able to test on other mobile devices.

Will test with Android.
Please clarify Android version and device

Android 5.1
Chrome 53.0.2785.124

Same happens for me but on desktop view (laptop with touchscreen if that somehow changes things).
Ubuntu 16.04. Clean M 2.1.2 install. Luma theme, developer mode, cache disabled.

With mouse clicks and touch.

@ilol any update on this?

Any news about this? This is a huge bug for UX.

@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?

Same Problem here. Costumer isn't very happy about this behaviour...

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

@jupiter01 I totally agree. We use it since a couple of weeks now and it's really great. @magento-team, maybe you should consider this instead of Fotorama?

Bug still exists in Magento 2.1.3. Solution to fix this:

in lib/web/mage/gallery/gallery.js
replace if (this.isTouchEnabled) { to if (this.isTouchEnabled && this.settings.isFullscreen) {

This prevents the fullscreen view to open when fullscreen is disabled.

Suggested fix in pull request here: https://github.com/magento/magento2/pull/8434

@Crossmotion @peec #8434 is accepted, can the issue be closed?

@vrann, Fine for me. Thanks for processing the fix so fas!

Hi!
Can enybody, please, explain me. How I can override initialize method (for add fix from @Crossmotion), that was defined in this file lib/web/mage/gallery/gallery.js. I try write mixin, but can't get this method in it.
All that I was found is this https://magento.stackexchange.com/questions/104324/how-to-extend-core-js-files-or-class-or-function-in-magento2

Thank you very much.

Internal ticket to track issue progress: MAGETWO-64250

Hi @peec. Thank you for your report.
The issue has been fixed in magento/magento2#14098 by @simpleadm in 2.1-develop branch
Related commit(s):

The fix will be available with the upcoming 2.1.14 release.

Was this page helpful?
0 / 5 - 0 ratings