PDA

View Full Version : Scrolling in FF no longer works when a ContentPanel is within a TabPanel



mazukas
29 Aug 2012, 6:17 AM
I have come across what I believe is a bug in FF (we're using version 10.0.3) that prevents a user from using the arrow keys to navigate up/down the content of a ContentPanel.

To recreate drop the following code into an EntryPoint class and then launch the app in FF:


Viewport viewport = new Viewport();
ContentPanel docContentPanel = new ContentPanel();

//This just creates a string long enough to force scrolling
String dummyText = "";
for (int x=0; x<100; x++) {
dummyText = dummyText + "Document Text<br />";
}

HtmlContainer textPanel = new HtmlContainer(dummyText);
docContentPanel.add(textPanel);
docContentPanel.setScrollMode(Scroll.AUTO);

TabPanel tabPanel = new TabPanel();
TabItem tabItem = new TabItem();
tabItem.setText("FooBar");
tabItem.setLayout(new FitLayout());
tabItem.add(docContentPanel);
tabPanel.add(tabItem);

RootPanel root = RootPanel.get();
root.clear();
viewport.setLayout(new FitLayout());
viewport.add(tabPanel);
root.add(viewport);

When you bring the app up click on the ContentPanel to give it focus and press the down arrow. You will see the entire panel shift (this is covered by EXTGWT-2393) instead of the content panel scrolling down. If you take the ContentPanel out of the TabPanel and put it directly into the Viewport scrolling works as expected. Any ideas on why this is happening when using a TabPanel container and if there is any way to fix it for FF?