Skip to content

Commit 38a6712

Browse files
committed
MAGETWO-44351: Gallery image sliding opens full-screen mode after mouse up event
1 parent 222b77c commit 38a6712

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

lib/web/mage/gallery/gallery.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,15 @@ define([
9090
this.initApi();
9191
this.setupBreakpoints();
9292
this.initFullscreenSettings();
93-
this.settings.$element.on('click', '.fotorama__stage__frame', function () {
94-
$('[data-gallery-role="gallery"]').data('fotorama').requestFullScreen();
95-
$('[data-gallery-role="fotorama__fullscreen-icon"]').css({
96-
opacity: 1,
97-
visibility: 'visible',
98-
display: 'block'
99-
});
93+
this.settings.$element.on('mouseup', '.fotorama__stage__frame', function () {
94+
if (!$(this).parents('.fotorama__shadows--left').length) {
95+
$('[data-gallery-role="gallery"]').data('fotorama').requestFullScreen();
96+
$('[data-gallery-role="fotorama__fullscreen-icon"]').css({
97+
opacity: 1,
98+
visibility: 'visible',
99+
display: 'block'
100+
});
101+
}
100102
});
101103
},
102104

0 commit comments

Comments
 (0)