X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775:/docs/source/RowExpander.html diff --git a/docs/source/RowExpander.html b/docs/source/RowExpander.html index f556ccdb..63f12e7d 100644 --- a/docs/source/RowExpander.html +++ b/docs/source/RowExpander.html @@ -1,10 +1,10 @@ - - - The source code - - - - + + + The source code + + + +
Ext.ns('Ext.ux.grid');
 
 
/** @@ -138,10 +138,19 @@ Ext.ux.grid.RowExpander = Ext.extend(Ext.util.Observable, { // @private onDestroy: function() { - this.keyNav.disable(); - delete this.keyNav; + if(this.keyNav){ + this.keyNav.disable(); + delete this.keyNav; + } + /* + * A majority of the time, the plugin will be destroyed along with the grid, + * which means the mainBody won't be available. On the off chance that the plugin + * isn't destroyed with the grid, take care of removing the listener. + */ var mainBody = this.grid.getView().mainBody; - mainBody.un('mousedown', this.onMouseDown, this); + if(mainBody){ + mainBody.un('mousedown', this.onMouseDown, this); + } }, // @private onRowDblClick: function(grid, rowIdx, e) { @@ -229,6 +238,6 @@ Ext.ux.grid.RowExpander = Ext.extend(Ext.util.Observable, { Ext.preg('rowexpander', Ext.ux.grid.RowExpander); //backwards compat -Ext.grid.RowExpander = Ext.ux.grid.RowExpander;
- +Ext.grid.RowExpander = Ext.ux.grid.RowExpander; + \ No newline at end of file