dimsemenov / PhotoSwipe

JavaScript image gallery for mobile and desktop, modular, framework independent
http://photoswipe.com
MIT License
24.18k stars 3.31k forks source link

Firefox 42: TypeError: _currPanBounds is undefined @ photoswipe.js:1088:3 #1022

Open manuel-84 opened 8 years ago

manuel-84 commented 8 years ago

on other browsers all is working as expected you can view the problem live at cyclingthetimes dot com (with minified files)

mjau-mjau commented 8 years ago

A bit hard to diagnose with such little info and a minified photoswipe, when the issue is likely related to your custom instantiation of Photoswipe and/or the html structure. This issue is does not occur anywhere else.

If you can reproduce the issue on Codepen, it can be diagnosed properly.

manuel-84 commented 8 years ago

this is the pen where i can see the same issue: http://codepen.io/anon/pen/NGJrQo

mjau-mjau commented 8 years ago

Confirm. Sorry, I really can't identify why you are getting this bug specifically for this example, in Firefox.

dimsemenov commented 8 years ago

What exactly to do to replicate the issue? And on what exactly OS do you test it? For some reason I'm not getting any errors in FF42, not on Mac, not on Windows.

manuel-84 commented 8 years ago

On Windows 8.1 and Firefox 42 when I click the button to load PhotoSwipe it loads the image but the interface is invisible and inactive, I can't zoom or close

mjau-mjau commented 8 years ago

I can reproduce the error on Mac/Firefox also. It happens randomly, and I can't see what the cause could be. I suspect it's related to multiple instances of Photoswipe. Once the error occurs, PS interface becomes unresponsive.

http://codepen.io/anon/pen/NGJrQo codepen

manuel-84 commented 8 years ago

I tried with Firefox 44 (dev. edition) and seems working fine :/ @mjau-mjau I can see the same problem with one instance too (you can delete one from the pen to try), and I also tried without jquery

dimsemenov commented 8 years ago

Please check if you can replicate issue on this pen http://codepen.io/dimsemenov/full/Oyqwav/ , maybe it's related to how images are cached in FF.

mjau-mjau commented 8 years ago

Please check if you can replicate issue on this pen http://codepen.io/dimsemenov/full/Oyqwav/ , maybe it's related to how images are cached in FF.

I can't seem to reproduce the error in the above pen. Interesting.

manuel-84 commented 8 years ago

@dimsemenov yes, I can replicate the issue in your pen and I also tried replacing the image links with placekittens+randomquery with same result

smm1378 commented 1 year ago

very old ! but for any one need : problem will solve with showAnimationDuration:0 and hideAnimationDuration:0 in options . example : let options = { index: 0, showAnimationDuration:0, hideAnimationDuration:0, modal: true }; // Initializes and opens PhotoSwipe Gallery_Core = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, options);