Closed sunwayru closed 6 months ago
Hi,
Sorry, but I can't reproduce any issue. So, please, share a live page/demo where your issue could be inspected.
Live demo
https://stackblitz.com/edit/stackblitz-starters-vkj1tk?file=index.html Used version 5.0.30 Open preview in new tab Click on image (in url appers hash) Refresh page (F5), fancybox opens at page load. All works fine!
Change version to 5.0.32 or last 5.0.36 Open preview in new tab Click on image (in url appers hash) Refresh page (F5), fancybox opens at page load and immediately closes. Bug detected!
First, it is actually working fine to me.
Since you've written so much code that duplicates the functionality of the Hash plugin, simply disable the Hash plugin to eliminate any interference.
If I disabled Hash plugin, then gallery not starts from url. Bug not fixed, he appears between 5.0.30 and 5.0.32. Please open https://stackblitz.com/edit/stackblitz-starters-vkj1tk?file=index.html Open preview in new tab Click on image (in url appers hash) Refresh page (F5), fancybox opens at page load and immediately closes. I need the pictures with the class "modalview" open in the modal view. In 5.0.30 my code works, in last release - not. Please, change the code on stackblitz to to achieve this goal
If you're expecting any changes, then sorry, that's not planned and in the next major release the Hash plugin will be removed, because after months of wasted work I've come to the conclusion that it's simply not possible to make it work reliably in all possible situations.
Describe the bug
Single image, that open automatically when loading the page with #hash, immediately after opening closes. All works fine wight groups, bug only for single images.
Reproduction
There was no error in 5.0.30, but bug appears in 5.0.31.
I use code example from https://fancyapps.com/fancybox/plugins/hash/ for automatically open single image in fancybox
Additional context
No response