PDA

View Full Version : Ext 3.3.1 to Ext 3.4 -> CellContextMenu error in GridPanel



pouniok
20 Jun 2011, 7:38 AM
Hi,


After migrating from Ext 3.3.1 to Ext 3.4 (for IE9 support), I lost all my right click menus in GridPanels.

The error thrown is : "this.indexOf is not a function" referring to ext-base.js :



Ext.applyIf(Array.prototype, {
/**
* Checks whether or not the specified object exists in the array.
* @param {Object} o The object to check for
* @param {Number} from (Optional) The index at which to begin the search
* @return {Number} The index of o in the array (or -1 if it is not found)
*/
indexOf : function(o, from){
var len = this.length;
from = from || 0;
from += (from < 0) ? len : 0;
for (; from < len; ++from){
if(this[from] === o){
return from;
}
}
return -1;
},

/**
* Removes the specified object from the array. If the object is not found nothing happens.
* @param {Object} o The object to remove
* @return {Array} this array
*/
remove : function(o){
var index = this.indexOf(o);
if(index != -1){
this.splice(index, 1);
}
return this;
}
});


I had the same problem with the TabPanel right click on tabs (with ux.TabCloseMenu.js), but I could solve the probleme by upgrading the file with the one in Ext 3.4.0 exampl/ux.

But CellContextMenu is a native grid event, and I can't update any file to make it work. Someone know what have changed between 3.3.1 and 3.4 and could cause these errors ?

RoyW
20 Jun 2011, 9:42 AM
I just posted a bug report about this
http://www.sencha.com/forum/showthread.php?137726-ExtJS-3.4.0-Menus-do-not-work-in-any-browser-other-than-IE

There is a workaround in that thread

pouniok
20 Jun 2011, 11:24 PM
Thanks, your fix is working !