ipsomatic9
ipsomatic9

Reputation: 23

Fancybox 2.1... scrolls page to top when opening

I'm having an issue with Fancybox scrolling the underlying page to it's top as soon as the modal window opens. When it closes it doesn't return to where the user was either. It forces the user to have to scroll back down the page to the point they left off.

Any insights?

Upvotes: 0

Views: 2742

Answers (3)

box86rowh
box86rowh

Reputation: 3415

To fix it here I used a built in helper function, this is how I set it up now:

$(".fancybox").fancybox({
            helpers: {
                overlay: {
                    locked: false
                }
            }
        });

Upvotes: 4

Millhorn
Millhorn

Reputation: 3166

In jquery.fancybox.css > fancybox-lock...

Change...

overflow: hidden !important;

to...

overflow: visible !important;

Upvotes: 4

Georgy Spassky
Georgy Spassky

Reputation: 223

I had same problem when opened fancybox content was iframe. I found out that there was some JS (in my page, loaded into iframe) containing .focus() directive. Removing this, bug was fixed...

Upvotes: 0

Related Questions