Skip to content

Commit 160f087

Browse files
author
Yauhen_Lyskavets
committed
MAGETWO-91707: [Sigma Beauty]Cannot pause Youtube video in IE 11
- Fix added
1 parent 8fd89cf commit 160f087

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

lib/web/fotorama/fotorama.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2487,11 +2487,11 @@ fotoramaVersion = '4.6.4';
24872487
.append($videoPlay.clone());
24882488

24892489
// This solves tabbing problems
2490-
addFocus(frame, function () {
2490+
addFocus(frame, function (e) {
24912491
setTimeout(function () {
24922492
lockScroll($stage);
24932493
}, 0);
2494-
clickToShow({index: frameData.eq, user: true});
2494+
clickToShow({index: frameData.eq, user: true}, e);
24952495
});
24962496

24972497
$stageFrame = $stageFrame.add($frame);
@@ -3040,7 +3040,10 @@ fotoramaVersion = '4.6.4';
30403040
return time;
30413041
}
30423042

3043-
that.showStage = function (silent, options, time) {
3043+
that.showStage = function (silent, options, time, e) {
3044+
if (e !== undefined && e.target.tagName == 'IFRAME') {
3045+
return;
3046+
}
30443047
unloadVideo($videoPlaying, activeFrame.i !== data[normalizeIndex(repositionIndex)].i);
30453048
frameDraw(activeIndexes, 'stage');
30463049
stageFramePosition(SLOW ? [dirtyIndex] : [dirtyIndex, getPrevIndex(dirtyIndex), getNextIndex(dirtyIndex)]);
@@ -3128,7 +3131,7 @@ fotoramaVersion = '4.6.4';
31283131
}
31293132
};
31303133

3131-
that.show = function (options) {
3134+
that.show = function (options, e) {
31323135
that.longPress.singlePressInProgress = true;
31333136

31343137
var index = calcActiveIndex(options);
@@ -3139,7 +3142,7 @@ fotoramaVersion = '4.6.4';
31393142

31403143
var silent = _activeFrame === activeFrame && !options.user;
31413144

3142-
that.showStage(silent, options, time);
3145+
that.showStage(silent, options, time, e);
31433146
that.showNav(silent, options, time);
31443147

31453148
showedFLAG = typeof lastActiveIndex !== 'undefined' && lastActiveIndex !== activeIndex;
@@ -3499,7 +3502,7 @@ fotoramaVersion = '4.6.4';
34993502

35003503
$stage.on('mousemove', stageCursor);
35013504

3502-
function clickToShow(showOptions) {
3505+
function clickToShow(showOptions, e) {
35033506
clearTimeout(clickToShow.t);
35043507

35053508
if (opts.clicktransition && opts.clicktransition !== opts.transition) {
@@ -3516,7 +3519,7 @@ fotoramaVersion = '4.6.4';
35163519
}, 10);
35173520
}, 0);
35183521
} else {
3519-
that.show(showOptions);
3522+
that.show(showOptions, e);
35203523
}
35213524
}
35223525

0 commit comments

Comments
 (0)