Results 1 to 5 of 5

Thread: [FNR] TreePanel not scrolling correctly when using arrow keys

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    8
    Vote Rating
    0
      0  

    Default [FNR] TreePanel not scrolling correctly when using arrow keys

    I'd be grateful for a workaround if somebody knows one.

    Steps to reproduce:

    1. run the code below which shows a tree
    2. expand all tree nodes, including child nodes, so a vertical scroll bar appears
    3. select the first node ("one")
    4. hit the down arrow key
    5. bug: the second node ("one one") is selected, but it scrolls out of sight.
    6. now scroll down and select any leaf, for example "two one four".
    7. keep hitting the arrow up key until you get to an inner node, for example "two one"
    8. bug: the correct node is selected, but it is not visible because the tree doesn't scroll

    I'm using GXT 2.2.4 in hosted mode on Mac OS X. I'm seeing this in Safari, FF, and Chrome. Not sure about other browsers.

    Code:
    public class Test implements EntryPoint {
    
        public void onModuleLoad() {
            ThemeManager.register(Slate.SLATE);
            GXT.setDefaultTheme(Slate.SLATE, true);
            
            TreeStore<Folder> store = new TreeStore<Folder>();
            Folder f1 = new Folder("1", "one");
            store.add(f1, false);
            Folder f11 = new Folder("11", "one one");
            store.add(f1, f11, false);
            store.add(f11, new Folder("111", "one one one"), false);
            store.add(f11, new Folder("112", "one one two"), false);
            store.add(f11, new Folder("113", "one one three"), false);
            store.add(f11, new Folder("114", "one one four"), false);
            store.add(f11, new Folder("115", "one one five"), false);
            store.add(f11, new Folder("116", "one one six"), false);
            store.add(f11, new Folder("117", "one one seven"), false);
            store.add(f11, new Folder("118", "one one eight"), false);
            store.add(f11, new Folder("119", "one one nine"), false);
            Folder f2 = new Folder("2", "two");
            store.add(f2, false);
            Folder f21 = new Folder("21", "two one");
            store.add(f2, f21, false);
            store.add(f21, new Folder("211", "two one one"), false);
            store.add(f21, new Folder("212", "two one two"), false);
            store.add(f21, new Folder("213", "two one three"), false);
            store.add(f21, new Folder("214", "two one four"), false);
            store.add(f21, new Folder("215", "two one five"), false);
            store.add(f21, new Folder("216", "two one six"), false);
            store.add(f21, new Folder("217", "two one seven"), false);
            store.add(f21, new Folder("218", "two one eight"), false);
            store.add(f21, new Folder("219", "two one nine"), false);
            store.add(new Folder("3", "three"), false);
            
            final TreePanel<Folder> pnlTree = new TreePanel<Folder>(store);
            pnlTree.setDisplayProperty("name");
            pnlTree.setSize(200, 200);
            
            LayoutContainer con = new LayoutContainer() {
                @Override
                public void onRender(Element target, int index) {
                    super.onRender(target, index);
                    add(pnlTree);
                }
            };
            
            con.add(pnlTree);
            RootPanel.get("sendButtonContainer").add(con);
        }
    }
    Code:
    public class Folder extends BaseTreeModel {
        private static final long serialVersionUID = 2525604102944798997L;
    
        public Folder(String id, String name) {
            set("id", id);
            set("name", name);
        }
    }

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976
    Vote Rating
    132
      0  

    Default

    This is fixed in SVN now as of revision 2416

  3. #3
    Sencha User
    Join Date
    Dec 2010
    Posts
    8
    Vote Rating
    0
      0  

    Default

    Thanks!

    Will this be in a future 2.x release, or 3.0 only?

  4. #4
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976
    Vote Rating
    132
      0  

    Default

    It will be in a future 2.X release. 2.2.5 will be the first version that will contain this change

  5. #5
    Sencha User
    Join Date
    Dec 2010
    Posts
    8
    Vote Rating
    0
      0  

    Default

    Herzlichen Dank fr die rasche Antwort

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •