Facebook javascript sdk UI dialog restoring scroll position

I have a long page where the bottom has a post on facebook button. when the user clicks on this FB.UI dialog box from the javascript sdk facebook popup. This all works fine, except that the page scrolls back to the top of the page where the dialog is displayed. I have a set under the tag that facebook recommends. I tried to move this to the part of the page where I need it, but the page continues to scroll up.

Any idea how I can get the factoring dialog to show where the current page scroll position is?

+8
html css facebook facebook-graph-api
source share
1 answer

You want to use the position:fixed; attribute position:fixed; inside the element that contains the Facebook dialog. Check out this link for more information and examples.

+2
source share

All Articles