fancyapps / fancybox

jQuery lightbox script for displaying images, videos and more. Touch enabled, responsive and fully customizable.
http://fancyapps.com/
7.29k stars 1.79k forks source link

Fancybox 4 Scrolling after close #2616

Closed gregzawadzki closed 2 years ago

gregzawadzki commented 2 years ago

How do I disable scrolling of fancybox4.

When you open fancybox, and scroll site down (link is not in viewport) then after closing Fancybox, it scrolls back to this place.
I think this is a feture of some sort probably, but I have implemented $('.gallery').trigger('click'), which is in footer. After closing gallery, user is scrolled up, so triggered link is in viewport. It must be that way and I'm looking for way to disable this behaviour.

fancyapps/ui/Fancybox v4.0.6

fancyapps commented 2 years ago

Hi,

See https://fancyapps.com/docs/ui/fancybox/options#placeFocusBack

gregzawadzki commented 2 years ago

Hi,

See https://fancyapps.com/docs/ui/fancybox/options#placeFocusBack

Thank you. I was looking at docs and didn't notice.

fancyapps commented 2 years ago

No worries. This question sometimes comes up, and I think I'll add it to the FAQ section.