We would like to have a fixed DOM element with position: fixed in our facebook canvas app with canvas size. Since the application runs in a canvas iframe, a simple use of the css position: fixed does not work: the contents of the iframe do not see any scroll events from their facebook page.
The first approach to solving this issue was to ping facebook api and get the scroll position. Therefore, we put this in $ (document) .ready ():
# refresh position of feedback button to simulate position:fixed in iframe refresh_timer = 1000 move_button = () ->
In general, this works. However, this leads to poor user experience when the browser reboot button and mouse cursor flash when a call is made to the facebook api.
Any suggestions on how to improve this or other ways to implement / mimic the position: fixed in iframe, highly appreciated!
source share