PDA

View Full Version : Ext.ux.form.SelectBox not removing event listener when destroyed.



xait
6 Dec 2010, 2:33 AM
Ext version tested:

Ext 3.3.0


Adapter used:

ext


css used:

only default ext-all.css
custom css (include details)


Browser versions tested against:

FF3


Operating System:

WinXP Pro


Description:
The select box class adds the following listener in the onRender method:


this.store.on('load', this.calcRowsPerPage, this);

but doesn't remove it in when destroying. This causes the handler to fail
in some cases.

Possible fix:
Add the following to the Ext.ux.form.SelectBox class :


onDestroy : function(ct, position) {
this.store.un('load', this.calcRowsPerPage, this);
Ext.ux.form.SelectBox.superclass.onDestroy.apply(this, arguments);
}