/*!
- * Ext JS Library 3.0.0
+ * Ext JS Library 3.1.0
* Copyright(c) 2006-2009 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
\r
// @private \r
onDestroy: function() {\r
- this.keyNav.disable();\r
- delete this.keyNav;\r
+ if(this.keyNav){\r
+ this.keyNav.disable();\r
+ delete this.keyNav;\r
+ }\r
+ /*\r
+ * A majority of the time, the plugin will be destroyed along with the grid,\r
+ * which means the mainBody won't be available. On the off chance that the plugin\r
+ * isn't destroyed with the grid, take care of removing the listener.\r
+ */\r
var mainBody = this.grid.getView().mainBody;\r
- mainBody.un('mousedown', this.onMouseDown, this);\r
+ if(mainBody){\r
+ mainBody.un('mousedown', this.onMouseDown, this);\r
+ }\r
},\r
// @private\r
onRowDblClick: function(grid, rowIdx, e) {\r