PDA

View Full Version : Avoid moving a window when a page is scrolled.



Hans Kejser Hansen
4 Aug 2010, 1:05 AM
I'm having a iframe with scrollable content and an ext window, that acts like a floating toolbar.

I would like the Ext window to keep it's position, when the content of the iframe are being scrolled. Any hints about how to achieve this ?

5 Aug 2010, 7:04 AM
maybe setup a scroll event handler on the element being scrolled, and call the window's "center" method.

Hans Kejser Hansen
9 Aug 2010, 12:06 AM
Thanks for your reply jgarcia.

Thats what i did, put an event handler om window.scroll. But i had hoped there was an Extjs way to do this.

Condor
9 Aug 2010, 12:16 AM
Rendering the window to the IFRAME body element would also work (but Ext has some cross-frame problems, which is why I would recommend using a ManagedIframe for this).