Skip to content

Commit

Permalink
Merge pull request #41 from magento-lynx/MC-42049_fix_keydown_and_keyup
Browse files Browse the repository at this point in the history
MC-42049: Fix keydown and keyup
  • Loading branch information
eliseacornejo committed May 27, 2021
2 parents 544bbaa + eb5f69f commit c40bd1f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/web/magnifier/magnify.js
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ define([
/**
* @todo keyboard navigation through Fotorama Api.
*/
$(document).keydown(keyboardNavigation);
$(document).on('keydown', keyboardNavigation);

$(document).on(isTouchEnabled ? 'touchend' : 'mouseup pointerup MSPointerUp', function (e) {
if (gallery.fullScreen) {
Expand Down Expand Up @@ -924,14 +924,14 @@ define([
e.stopPropagation();
});

$zoomIn.keyup(function (e) {
$zoomIn.on('keyup', function (e) {

if (e.keyCode === 13) {
zoomIn(e);
}
});

$(window).keyup(function (e) {
$(window).on('keyup', function (e) {

if (e.keyCode === 107 || fotorama.fullscreen) {
zoomIn(e);
Expand All @@ -947,14 +947,14 @@ define([
e.stopPropagation();
});

$zoomOut.keyup(function (e) {
$zoomOut.on('keyup', function (e) {

if (e.keyCode === 13) {
zoomOut(e);
}
});

$(window).keyup(function (e) {
$(window).on('keyup', function (e) {

if (e.keyCode === 109 || fotorama.fullscreen) {
zoomOut(e);
Expand Down

0 comments on commit c40bd1f

Please sign in to comment.