-
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
Fix incorrect image magnifier size bug in Safari #17426
Fix incorrect image magnifier size bug in Safari #17426
Conversation
Hi @dannynimmo. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @VladimirZaets, thank you for the review. |
@dannynimmo thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
Hi @magento-engcom-team, how can I get the Travis CI build to pass? The build failed on the below step:
I don't believe this is related to this pull request. |
Hi @dannynimmo. Thank you for your contribution. |
Description
This pull request fixes a bug in the product gallery magnifier (zoom). In some cases (e.g. in the Safari browser), the image full size is calculated incorrectly, due to the image not being loaded before the dimensions are checked.
The fix makes use of the image element properties
naturalWidth
&naturalHeight
which can check the full size of the image without needing to re-create it from thesrc
.naturalWidth
&naturalHeight
are supported in IE9+, and all other browsers.Fixed Issues (if relevant)
Manual testing preconditions
etc/view.xml
Manual testing scenarios
Contribution checklist