fotorama
fotorama copied to clipboard
Exit full screen mode throws js error
fotorama throws js error on exit full screen mode. Even on fotorama.io
uncaught (in promise) TypeError: Not in fullscreen mode
cancel https://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.4/fotorama.js:4
kd https://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.4/fotorama.js:4
Fotorama https://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.4/fotorama.js:5
fotorama.js:4:15238
The function cancelFullScreen needs to be changed.
function cancelFullScreen () {
if (that.fullScreen) {
that.fullScreen = false;
if (FULLSCREEN && that.fullScreen) {
fullScreenApi.cancel(fotorama);
}
$BODY.removeClass(_fullscreenClass);
$HTML.removeClass(_fullscreenClass);
$fotorama
.removeClass(fullscreenClass)
.insertAfter($anchor);
measures = $.extend({}, measuresStash);
unloadVideo($videoPlaying, true, true);
updateTouchTails('x', false);
that.resize();
loadImg(activeIndexes, 'stage');
lockScroll($WINDOW, scrollLeft, scrollTop);
triggerEvent('fullscreenexit');
}
}