2

In fancybox 2 you have the helpers option, i used this to stop the browser from scrolling to the top after a fancybox exit:

helpers: { overlay: { locked: true } } what is the fancybox 3 equilevant? i can't find it in the documentation. The helpers option does not work in fancybox 3 and default it scrolles to the top in my fancybox 3 implementation.

Paul
  • 21
  • 2
  • What do you mean by "default it scrolles to the top"? It disables scrolling by default. While both versions have some similarities, v3 is completely different, therefore you will not find that option. – Janis Mar 11 '18 at 11:50
  • My fancybox2 implementation opens the overlay and after a submit the fb2 layer is closed and scrollbar stays in place (does no scoll to top). This is because of the code above. When i implement the fb3 code, the browser scroll to the top of the page after the same submit and close of the fb3 overlay. When in my fb2 implementation i remove the helper, the same behavior occurs like the fb3 implementation. So the helper fix the scrolling. Because helpers are not in fb3 anymore, i'm looking for the fb3 equilevant. – Paul Mar 12 '18 at 08:59
  • It is not scrolling for me, so I do not know what are you talking about. – Janis Mar 12 '18 at 09:26

1 Answers1

0

You may use

{
  backFocus: false
}
bobbyrne01
  • 6,295
  • 19
  • 80
  • 150
CimiGod
  • 1
  • 1