-
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
Allow keyboard navigation in browser on product detail pages, by fixi… #18212
Allow keyboard navigation in browser on product detail pages, by fixi… #18212
Conversation
…ng fotorama library to not change to a different image when pressing left or right arrow key in combination with certain modifier keys on your keyboard.
Hi @hostep. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
@magento-engcom-team give me test instance |
Hi @VladimirZaets. Thank you for your request. I'm working on Magento instance for you |
@magento-engcom-team give me 2.3-develop instance |
Hi @okorshenko. Thank you for your request. I'm working on Magento 2.3-develop instance for you |
Hi @okorshenko, here is your Magento instance. |
@magento-engcom-team give me test instance |
Hi @okorshenko. Thank you for your request. I'm working on Magento instance for you |
Hi @okorshenko, here is your new Magento instance. |
Hi @sidolov, thank you for the review. |
Hi @hostep. Thank you for your contribution. |
…ng fotorama library to not change to a different image when pressing left or right arrow key in combination with certain modifier keys on your keyboard.
Description
I'm trying to use my keyboard as much as possible during my work since I find it more efficient then using a mouse/trackpad.
However, if you end up on a product detail page with images in Magento, you can not use your keyboard to navigate to the previous or next page in your browser history.
Previously the fotorama library got triggered for switching to the next or previous image by pressing the left or right arrow key, but when pressing certain modifier keys to go back/forward in the browsers history, fotorama intercepted this and blocked this, which is really annoying.
This PR should fix this.
I researched a little bit what keyboard shortcuts are used in different browsers on different operating systems, and it looks like those are:
It looks like all major browsers seem to follow this, but this should be tested by someone having access to all those different variants.
I've only tested on macOS with Google Chrome 69.0.3497.100, Firefox 62.0.2 and Safari 12.0
Also see:
The minified fotorama file was manipulated manually because I don't know how the minified file got generated.
I've tested Magento both in development as in production modus (with minify js files enabled) and everything seems to work perfectly fine.
Fixed Issues (if relevant)
None that I could find.
Manual testing scenarios
Contribution checklist