Skip to content

Commit 3e40b2e

Browse files
author
Stanislav Idolov
authored
ENGCOM-3101: Backport 2.2 - Allow keyboard navigation in browser on product detail… #18391
2 parents 9621fd8 + 63cda00 commit 3e40b2e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/web/fotorama/fotorama.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1945,10 +1945,10 @@ fotoramaVersion = '4.6.4';
19451945
if (e.keyCode === 27) {
19461946
catched = true;
19471947
that.cancelFullScreen();
1948-
} else if ((e.shiftKey && e.keyCode === 32 && allowKey('space')) || (e.keyCode === 37 && allowKey('left')) || (e.keyCode === 38 && allowKey('up') && $(':focus').attr('data-gallery-role'))) {
1948+
} else if ((e.shiftKey && e.keyCode === 32 && allowKey('space')) || (!e.altKey && !e.metaKey && e.keyCode === 37 && allowKey('left')) || (e.keyCode === 38 && allowKey('up') && $(':focus').attr('data-gallery-role'))) {
19491949
that.longPress.progress();
19501950
index = '<';
1951-
} else if ((e.keyCode === 32 && allowKey('space')) || (e.keyCode === 39 && allowKey('right')) || (e.keyCode === 40 && allowKey('down') && $(':focus').attr('data-gallery-role'))) {
1951+
} else if ((e.keyCode === 32 && allowKey('space')) || (!e.altKey && !e.metaKey && e.keyCode === 39 && allowKey('right')) || (e.keyCode === 40 && allowKey('down') && $(':focus').attr('data-gallery-role'))) {
19521952
that.longPress.progress();
19531953
index = '>';
19541954
} else if (e.keyCode === 36 && allowKey('home')) {
@@ -3547,7 +3547,7 @@ fotoramaVersion = '4.6.4';
35473547

35483548
if ((result.moved || (toggleControlsFLAG && result.pos !== result.newPos && !result.control)) && result.$target[0] !== $fullscreenIcon[0]) {
35493549
var index = getIndexByPos(result.newPos, measures.w, opts.margin, repositionIndex);
3550-
3550+
35513551
that.show({
35523552
index: index,
35533553
time: o_fade ? o_transitionDuration : result.time,

0 commit comments

Comments
 (0)