Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exit full screen mode throws js error #566

Open
BackuPs opened this issue Feb 4, 2021 · 0 comments
Open

Exit full screen mode throws js error #566

BackuPs opened this issue Feb 4, 2021 · 0 comments

Comments

@BackuPs
Copy link

BackuPs commented Feb 4, 2021

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');
	}
  }
XjSv added a commit to XjSv/fotorama that referenced this issue Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant