From 38a6712542a565973a4b5bce7d8ea965ecc3b0cc Mon Sep 17 00:00:00 2001 From: Oleksandr Miroshnichenko <omiroshnichenko@ebay.com> Date: Wed, 21 Oct 2015 13:48:50 +0300 Subject: [PATCH] MAGETWO-44351: Gallery image sliding opens full-screen mode after mouse up event --- lib/web/mage/gallery/gallery.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/web/mage/gallery/gallery.js b/lib/web/mage/gallery/gallery.js index 245f08f824b..75594a9dfd0 100644 --- a/lib/web/mage/gallery/gallery.js +++ b/lib/web/mage/gallery/gallery.js @@ -90,13 +90,15 @@ define([ this.initApi(); this.setupBreakpoints(); this.initFullscreenSettings(); - this.settings.$element.on('click', '.fotorama__stage__frame', function () { - $('[data-gallery-role="gallery"]').data('fotorama').requestFullScreen(); - $('[data-gallery-role="fotorama__fullscreen-icon"]').css({ - opacity: 1, - visibility: 'visible', - display: 'block' - }); + this.settings.$element.on('mouseup', '.fotorama__stage__frame', function () { + if (!$(this).parents('.fotorama__shadows--left').length) { + $('[data-gallery-role="gallery"]').data('fotorama').requestFullScreen(); + $('[data-gallery-role="fotorama__fullscreen-icon"]').css({ + opacity: 1, + visibility: 'visible', + display: 'block' + }); + } }); }, -- GitLab