Reputation: 2465
I am working on an iframe based Facebook applicaton. I am able to use FB.Canvas.setAutoResize(); to let the iframe "stretch" the page so there's no scroll bar for the iframe. The page may be 2-3 page-length in height. I can scroll down the page using the windows scroll bar. The issue is when I am at the bottom of the page and I click a link inside the frame, the content in the frame loads but I am still at the bottom of the page. Is there a way to set it so that when the link inside the frame is clicked, the outer page will scroll back up to the top of the page so you can see the content of the frame at the top? Mike
Upvotes: 4
Views: 1310
Reputation: 320
The best solution I've found is to make sure any links below the fold target '_top' and href 'apps.facebook.com/appname/?whatever'. In essense, you're reloading the FB chrome on every click.
This has the added benefit of sending new access_tokens more often.
UPDATE: Facebook announced today that this now works: FB.Canvas.scrollTo(0,0);
Upvotes: 4