diff --git a/app/code/Magento/ProductVideo/view/frontend/web/js/fotorama-add-video-events.js b/app/code/Magento/ProductVideo/view/frontend/web/js/fotorama-add-video-events.js index 3d5c9412c8dc7..a441a1f55e5d7 100644 --- a/app/code/Magento/ProductVideo/view/frontend/web/js/fotorama-add-video-events.js +++ b/app/code/Magento/ProductVideo/view/frontend/web/js/fotorama-add-video-events.js @@ -484,6 +484,7 @@ define([ if ($image.type === 'image') { $image.$navThumbFrame && $image.$navThumbFrame.removeClass(this.TI); + this._hideCloseVideo(); return; } else if ($image.$navThumbFrame && $image.type === 'video') { !$image.$navThumbFrame.hasClass(this.TI) && $image.$navThumbFrame.addClass(this.TI); diff --git a/lib/web/mage/gallery/gallery.js b/lib/web/mage/gallery/gallery.js index 9c35671525e29..e761c3dd279db 100644 --- a/lib/web/mage/gallery/gallery.js +++ b/lib/web/mage/gallery/gallery.js @@ -59,6 +59,17 @@ define([ }); return slideTransform.filter(Boolean); + }, + + _toNumber = function (str) { + + var type = typeof(str); + + if (type === 'string') { + return parseInt(str); + } else { + return str; + } }; return Class.extend({ @@ -99,6 +110,12 @@ define([ config.fullscreen.arrows = false; } } + + config.options.width = _toNumber(config.options.width); + config.options.height = _toNumber(config.options.height); + config.options.thumbwidth = _toNumber(config.options.thumbwidth); + config.options.thumbheight = _toNumber(config.options.thumbheight); + config.options.swipe = true; this.config = config;