-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
The option <var name="allowfullscreen">false</var> for mobile device don't work in product view page gallery #12285
Comments
<var name="allowfullscreen">false</var>
for mobile device does not work in product view page gallery
@novakivskiy, thank you for your report. |
Can reproduce on magento 2.2 by following steps. Steps are the same:
Code after changes:
Expected result:fullscrreen is disabled on mobile screens Actual result:fullscreen is working Can be because of json that set to window object contains only string as value for breakpoints (example: "allowfullscreen": "false") object (should be bool for allowfullscreen key)
|
Just Posted the Same issue my self on magento 2.2.1. |
@novakivskiy, thank you for your report. |
You are correct. As a temporary solution i hard coded it in module-catalog/view/frontend/templates/product/view/gallery.phtml I replaced
with
Now it works as it should. false was getting rendered as a string. Thanks, your post really helped me! cheers |
As a solution, create a plugin for the class \Magento\Catalog\Block\Product\View\Gallery
Or write a recursive function to bypass all nodes in the array. Where will the conversion be done from the string type to the type of booleans("true"->true) |
Hi @novakivskiy |
cool, thanks |
Hi @novakivskiy. Thank you for your report. The fix will be available with the upcoming 2.3.0 release. |
Hi @novakivskiy. Thank you for your report.
The fix will be available with the upcoming 2.3.0 release. |
…ar name="allowfullscreen">false</var> for mobile device don't work in product view page gallery #15021
Hi @novakivskiy. Thank you for your report. The fix will be available with the upcoming 2.2.5 release. |
2 days later the commit 8ef039e was reverted So the issue is still valid and gallery doesn't work. |
Yes, that was my fault. I have no idea how both I didnt see it, and the reviewers didnt see it, but yes it was accidentally reverted in a commit for another issue. The revertion was corrected in PR #16594 in August though and should be available in 2.2.7. |
@gwharton I've just seen your revert of the revert, but for some reason this change is not reflected in the file content, and the file history: |
@tmotyl If you have time, can you take a look at the above PR and comment on changes. |
…">false</var> for mobile device don't work in product view page gallery" This reverts commit b8232c5.
…">false</var> for mobile device don't work in product view page gallery" This reverts commit bf40afa.
…">false</var> for mobile device don't work in product view page gallery" This reverts commit ccc35c2.
Preconditions
Steps to reproduce
<theme>/etc/view.xml
<var name="allowfullscreen">false</var>
to mobile breakpointsExample:
"breakpoints": {"mobile":{"conditions":{"max-width":"767px"},"options":{"options":{"navigation":"dots","allowfullscreen":"false"}}}} }
Expected result
For screens smaller than <720px, do not open the gallery full screen
Actual result
The text was updated successfully, but these errors were encountered: