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

I can't disable full screen gallery on mobile on magento 2.2.1 #12490

Closed
joebordo opened this issue Nov 29, 2017 · 7 comments
Closed

I can't disable full screen gallery on mobile on magento 2.2.1 #12490

joebordo opened this issue Nov 29, 2017 · 7 comments
Assignees
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@joebordo
Copy link

joebordo commented Nov 29, 2017

I applied the code below to disable full screen gallery in magento 2.2.1

`<var name="breakpoints">
        <var name="mobile">
            <var name="conditions">
                <var name="max-width">767px</var>
            </var>
            <var name="options">
               <var name="options">
                 <var name="allowfullscreen">false</var>
                 <var name="arrows">false</var> <!-- Turn on/off arrows on the sides preview (true/false) -->
                 <var name="nav">thumbs</var> 
                </var>
            </var>
        </var>
    </var>`

The code does not work. The full screen gallery is still not disabled on mobile. (under 767 px)

Preconditions

magento 2.2.1
php 7.1

Steps to reproduce

Add the code above, it should disable the full screen gallery under 767 px.
false (this code does nothing)

Expected result

It does nothing.

Actual result

Nothing happens, the gallery is still enabled in mobile (under 767 px)

@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Nov 29, 2017
@magento-engcom-team
Copy link
Contributor

@joebordo, thank you for your report.
We've created internal ticket(s) MAGETWO-84793 to track progress on the issue.

@joebordo
Copy link
Author

joebordo commented Nov 30, 2017

Okey the problem is that it passes breakpoint value as a string.

It renders the breakpoints like this:

[ "breakpoints": {"mobile":{"conditions":{"max-width":"767px"},"options":{"options":{"nav":"dots","allowfullscreen":"false"}}}} }]

But it should be like this

"breakpoints": {"mobile":{"conditions":{"max-width":"767px"},"options":{"options":{"nav":"dots","allowfullscreen":false}}}} }

false should not be a string.

As a temporary solution you can replace the php echo block for the breakpoints in

module-catalog/view/frontend/templates/product/view/gallery.phtml

with the above code directly. Until this is fixed.

@p-bystritsky p-bystritsky self-assigned this Dec 12, 2017
@okorshenko
Copy link
Contributor

Hi @joebordo
The issue has been fixed and delivered in 2.2-develop branch. Will be available with upcoming patch release.

@okorshenko okorshenko added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Dec 13, 2017
@ikevinkk
Copy link

Hi @okorshenko

Firstly wish you a Happy Christmas and a Happy New Year in 2018!

I'm a newcomer that i may have a same problem as yours :

The problem is when go on any Android or IOS device, go to a product page, open the image gallery of the item. Try to click the upper right hand X and the gallery does NOT close. You have to hit the back button on the browser to get out of it but when you do that, it takes you back to the product grid page. It has been tested on iphone 5s, and iPhone 6s and iPhone 7. (i had pasted a screenshot of it is appearing on iphone 7)

Thanks a million to help me out of this problem.

problem screenshot

@Chad-Mathews
Copy link

Chad-Mathews commented Jan 5, 2018

@joebordo is right that it passes breakpoint value as a string. Another workout around I found without having to override gallery.phtml is to just set the var value to an empty string so it returns false.
<var name="allowfullscreen"></var>

@BB-000
Copy link

BB-000 commented Jan 18, 2018

Still having this problem in 2.2.2.. ):

@sashas777
Copy link
Contributor

sashas777 commented Feb 23, 2018

@okorshenko
I can confirm the issue exist at Magento 2.2.2.
module-catalog/view/frontend/templates/product/view/gallery.phtml
breakpoints return:
"breakpoints": {"mobile":{"conditions":{"max-width":"767px"},"options":{"options":{"nav":"thumbs","arrows":"false","allowfullscreen":"false","thumbwidth":"64","thumbheight":"64","navtype":"slides"}}}}

Where "false" should be false in order to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

8 participants