Results 1 to 2 of 2

Thread: Event life cycle varies for tree panel in Firefox (V 26.0) and Chrome (V 32.0.1700)

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jan 2014
    Vote Rating

    Default Event life cycle varies for tree panel in Firefox (V 26.0) and Chrome (V 32.0.1700)

    I am using ExtJS 4.2.1.

    I have a tree panel, which has a rest proxy store as a data source.

    A part of it can be represented like this:
    Ext.define('MyApp.view.MyTreePanel', {
      extend: 'Ext.tree.Panel',
      hideHeaders: true,
      rootVisible: false,
      id: 'mytreepanel',
      store: 'StoreName'
     //  ... other configurations ...
    The data which I have in the tree store, has got a rootnode with 3 child nodes and those nodes internally have 2, 3, 2 child nodes respectively. None of the nodes in the entire tree is expaned by default - meaning, I havne't used expanded: true in the store for nodes.

    And also I have one controller where I have bound the events for this view as below:

    Ext.define('MyApp.view.MyController', {
      extend: '',
      requies: ['MyApp.view.MyTreePanel'],
      refs: [{
        ref: 'myPanel',
        selector: '#mytreepanel'
      init: function() {
          '#mytreepanel': {
            load: this.expandLevel1,
            afteritemexpand: this.expandLevel2,
            viewready: function() {
              console.log('view viewready fired');
            boxready: function() {
              console.log('view boxready fired');
      expandLevel1: function() {
        // code to expand the level1 nodes
      expandLevel2: function() {
        //code to expand the level2 nodes
      // ... other config ...
    So as soon as the store is loaded I expand the level1 nodes, and I bind event 'afteritemexpand' which triggers for all the nodes respectively as soon as the nodes are expanded, which iterates through the child nodes for the expanded node and does some stuff (not including it here as it might be irrelevant).

    The setup which I have is working fine in Chrome and IE (v 9).

    Strange thing happening here is, in Firefox, the afteritemexpand does not fire at all. So I believe, the code which is responsible to fire the 'afteritemexpand' event is not getting executed, as in ExtJS 4.2.1 src\tree\View.js the control return in the 'onExpand' method in one if condition, where comment says, 'The item is not visible yet'. But the lines of code are executed properly in Chrome and everything works as expected.

    I tried to put some console logs in src\tree\View.js and realized that the afteritemexpand event fires after viewready and boxready in chrome, whilst in firefox nothing happens, because the control returned as I said above and didn't fire the events. And also in firefox, I got logs from View.js before I got the logs for the viewready and boxready.

    And also when I try to get root node and its children (using getRootNode().childNodes) in viewready event, in firefox, I receive all the nodes in an array, whilst in chrome it returns an empty array.

    I tried to reproduce the issue in a smaller workspace which could be posted here, but unfortunately I am not able to reproduce it.

    I am not sure why this is happening, if not complete solution, any kind of pointer as in where shall I look for the problem, would be appreciated very well
    Live Long And Prosper

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Vote Rating


    Without a test case it is difficult to proceed. It seems that this issue has been reported before:

    Seems we are having trouble reproducing the issue.

Tags for this Thread

Posting Permissions

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