PDA

View Full Version : ExtJS 4.0.2a - Scroller left behind on grid destruction



kreeve_ctisn
23 Jun 2011, 1:53 PM
Ext version tested:

Ext 4.0.2a

Browser versions tested against:

Firefox 4 (firebug 1.7.3 + illuminations)

Description:


looking at the list of widgets in illuminations while creating a grid. Before no grid, no scrollers.
Grid created and shown, scrollers listed. grid destroyed. scroller remains

Steps to reproduce the problem:

create window
add tab panel as child of window
create grid tab as child of tab panel
show window
destroy window

The result that was expected:

no widget/items left behind from window

The result that occurs instead:

Ext.grid.Scroller <model.user> [2] { id="gridscroller-1146"} left behind

Possible fix:

update grid destroy with following:


if (this.verticalScroller) {
this.verticalScroller.destroy();
delete this.verticalScroller;
}
if (this.horizontalScroller) {
this.horizontalScroller.destroy();
delete this.horizontalScroller;
}