PDA

View Full Version : Selecting a tab makes the window scroll to the top



vegidio
11 Oct 2014, 4:12 AM
Hi,

I'm developing a webpage using ExtJS 4 and I noticed that sometimes when I have nested containers with a Tab Panel in one of them, if I change the tabs it makes the window scroll to the top. You can see the behavior here: https://fiddle.sencha.com/?fiddle=blt#fiddle/blt
Scroll to the bottom of the screen
Select one the tabs
The window will automatically scroll to the top
Before someone points it out: I know that don't need to use a lot of nested containers in this specific example, but keep in my that this is just an example. The real life scenario that I'm developing is more complex than this and I have to use nested containers.

Thanks.

slemmon
14 Oct 2014, 2:15 AM
The continued layouts + dynamic height of that top-level container are what's causing the issue you're seeing. You'll need to either give the top-level container a set height or have it's size managed by an owning container (often a viewport).