1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    5
    Vote Rating
    0
    casey@hotmath.com is on a distinguished road

      0  

    Default GXT ListView in TabPanel IE scrolling bug

    GXT ListView in TabPanel IE scrolling bug


    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);
        }
    }

  2. #2
    Sencha User
    Join Date
    Jul 2011
    Posts
    1
    Vote Rating
    0
    gsivamal is on a distinguished road

      0  

    Default ListView selection after scroll

    ListView selection after scroll


    I too have the same issue.
    I am using GXT 2.2.3, after scroll select any item the control goes back to top. The view is not maintaining the selection.

  3. #3
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    This is a known problem. Instead of setting the scrollmode to auto on the TabItem give it a FitLayout. The ListView can handle scrolling internly.

    It will be completly fixed in GXT 3

Similar Threads

  1. Selecting and scrolling items in a ListView
    By panurgy in forum Ext GWT: Discussion
    Replies: 0
    Last Post: 17 Nov 2010, 9:23 AM
  2. [OPEN] [CLOSED][3.0.0] ListView not scrolling vertically
    By vinnybozz in forum Ext 3.x: Bugs
    Replies: 15
    Last Post: 15 Sep 2009, 1:48 AM
  3. ListView not scrolling ?
    By vinnybozz in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 13 Jul 2009, 9:45 AM
  4. [ListView] Scrolling a ListView's body down
    By Mitz in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 28 Apr 2009, 2:34 AM

Thread Participants: 2