Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    7
    Vote Rating
    0
    xsba is on a distinguished road

      0  

    Default [BUG] selected node lose CSS selection class after editing

    [BUG] selected node lose CSS selection class after editing


    REQUIRED INFORMATIONExt version tested:
    • Ext 4.1.1
    Browser versions tested against:
    • Chrome
    • FF 14.0.1 (firebug 1.10.2 installed)
    Description:
    • Selected node loses visual CSS selection class after editing
    Steps to reproduce the problem:
    • load tree panel
    • select tree node
    • edit node information
    The result that was expected:
    • node with updated node information is still selected
    The result that occurs instead:
    • node is not visually selected, but selectionModel indicates it as selected
    Test Case:
    Code:
     var store = Ext.create('Ext.data.TreeStore', {
    root: {
    expanded: true,
    children: [
    { text: "detention", leaf: true },
    { text: "homework", expanded: true, children: [
    { text: "book report", leaf: true },
    { text: "alegrbra", id:'select', leaf: true}
    ] },
    { text: "buy lottery tickets", leaf: true }
    ]
    }
    });
    
    var tree = Ext.create('Ext.tree.Panel', {
       width: 400,
       height: 250,
       store: store,
       rootVisible: false,
       renderTo: Ext.getBody(),
       viewConfig: {
          markDirty : false
       },
    dockedItems: [{
    xtype: 'toolbar',
    dock: 'bottom',
    items: [{
    text: 'Edit',
    handler: function(){
    var sm = tree.getSelectionModel();
    var node = sm.getLastSelected();  
    node.beginEdit();
    node.set('text', 'test1');
    node.endEdit();                   
    }
    },{
    text: 'Check',
    handler: function(){
    var sm = tree.getSelectionModel();
    var node = sm.getLastSelected();
    Ext.Msg.alert('Check', node.get('text'));
    }
    }]
    }]
    
    });‚Äč

    HELPFUL INFORMATION

    See this URL for live test case: Operating System:
    • Win7

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,065
    Vote Rating
    659
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Thanks for the test case, we already have this one resolved for the next release.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2007
    Posts
    64
    Vote Rating
    2
    ojintoad is on a distinguished road

      0  

    Default


    Does this have a reported issue # that we can use to keep track?

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,065
    Vote Rating
    659
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  5. #5
    Sencha Premium Member
    Join Date
    Mar 2007
    Posts
    64
    Vote Rating
    2
    ojintoad is on a distinguished road

      0  

    Default


    Thank you!

Thread Participants: 2