This issue duplicates another issue.
Sencha Premium Member
BUG FIX: src/tree/View.js (patch attached)
Ext version tested:
Browser versions tested against:
- Chrome 24.0.1312.57 m
- IE 8.0.6
- FF 18.0.2 (firebug 1.12.0a.2 installed)
- Safari 5.1.7
Steps to reproduce the problem:
The full chrome stack trace is:
- Create app with window that get's opened on button click
- In the window, display a tree panel that is read from an ajax source
- Run app, and open window, then close it.
- Re-open Window.
- Error from Chrome: Uncaught TypeError: Cannot call method 'indexOf' of null ext-all-dev.js:164027
1. Uncaught TypeError: Cannot call method 'indexOf' of null ext-all-dev.js:164027
8. (anonymous function)ext-all-dev.js:88471
12. (anonymous function)ext-all-dev.js:3000
The solution requires a fix to Ext.tree.View (we have attached a patch with this report). Bottom line, the initComponent method of Ext.tree.View registers listeners using the unmanaged on() call for both it's own store and the treepanel's store. It should instead using the addManagedListner version -- ie: mon().
What appears to be happening is that even AFTER the window containing the treepanel is closed, the 'beforefill' event handler is still registered. The second time the window is created, there are now two 'beforefill' event handlers, but the first registered handler refers to a view that is no longer valid. When the event fires, it try's to dereference a 'null' reference which causes the exception.
- Windows 7 Pro
- Windows 2003 Server