In IE (any version) when a ListView is embedded in a TabPanel and the TabItem has scrolling enabled any item selected causing the entire list to reset and the first element is selected.
Steps:
0. In IE (7/8 tested)
1. Use scrollbar to scroll down ... so the last items are visible.
2. Select any item ...
3. The scrollbar is reset to to the top and you selected item is no longer selected.
Shown below is a simple example.
Code:
public class CatchupMathTest implements EntryPoint {
public void onModuleLoad() {
LayoutContainer main = new LayoutContainer();
main.setLayout(new FitLayout());
TabPanel tabPanel = new TabPanel();
TabItem tabItem = new TabItem("TEST");
tabItem.setScrollMode(Scroll.AUTO);
ListView<MyModel> listView = new ListView<MyModel>();
listView.setStore(createListStore());
tabItem.add(listView);
tabPanel.add(tabItem);
Viewport viewPort = new Viewport();
viewPort.setLayout(new FitLayout());
viewPort.add(tabPanel);
RootPanel.get().add(viewPort);
}
private ListStore<MyModel> createListStore() {
ListStore<MyModel> myStore = new ListStore<MyModel>();
for(int i=0;i<100;i++) {
myStore.add(new MyModel("Test: " + i));
}
return myStore;
}
}
class MyModel extends BaseModel {
public MyModel(String data) {
set("text", data);
}
}