-
21 Jan 2013 2:26 AM #1
NodeInterface subclass event firing causes stackoverflow
NodeInterface subclass event firing causes stackoverflow
Found this code in the NodeInterface:
And colored line causes infinite recursion if tree model class is a subclass of the another tree model class, since "this.superclass" in such case will still point to the class with NodeInterface applied.Code:fireEventArgs: function(eventName, args) { var rootNode, fireEventArgs = this.superclass.fireEventArgs, result; // The event bubbles (all native NodeInterface events do)... if (bubbledEvents[eventName]) { for (var eventSource = this; result !== false && eventSource; eventSource = (rootNode = eventSource).parentNode) {
A test case attached (replace the content of /examples/tree/treegrid.js with it).
Proposed solutions:
Quick and dirty:
This solution does not take into account that some of the intermediate subclasses may re-define `fireEventArgs` additionally, but probably is acceptable.Code:fireEventArgs: function(eventName, args) { var rootNode, fireEventArgs = Ext.data.Model.prototype.fireEventArgs, result; // The event bubbles (all native NodeInterface events do)... if (bubbledEvents[eventName]) { for (var eventSource = this; result !== false && eventSource; eventSource = (rootNode = eventSource).parentNode) {
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-8272
in
4.2.0 Sprint 3.


Reply With Quote