PDA

View Full Version : [CLOSED] IE bug on 'Ext.menu.Menu', {... lookupComponent: function(cmp) {...lookupComponent: f



mxu
24 Jul 2011, 1:19 PM
IE bug on 'Ext.menu.Menu', {... lookupComponent: function(cmp) {...lookupComponent: f:

trying to migrate v$.* from v2.*.
handling treenode event like
_AnalysisTreePanel_.on('itemcontextmenu', onATreeContextMenu, _AnalysisTreePanel_);
_AnalysisTreePanel_.on('itemclick', onATreeClick, _AnalysisTreePanel_);
_AnalysisTreePanel_.on('itemdblclick', onATreeDClick, _AnalysisTreePanel_);
_AnalysisTreePanel_.on('checkchange', onATreeCheckBoxChange, _AnalysisTreePanel_);

it works fine on FF3.* for all four events
but on IE 8.*, mouse right clicking ( ('itemcontextmenu' event) won't take effect ('itemclick, 'itemdblclick' and 'checkchange' work fine) tried to use ext-all.js but won't work either.

here is what IE 8.* the error msg looks like
////////////////////////////////////////////////////////////////////////////////////////////////
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; InfoPath.3; .NET4.0E)
Timestamp: Thu, 21 Jul 2011 18:01:01 UTC


Message: 'undefined' is null or not an object
Line: 121438
Char: 9
Code: 0
URI: http://flexo/projects/SNP/mxu/GaPBro...-w-comments.js
[
Ext.define('Ext.menu.Menu', {
...
lookupComponent: function(cmp) {
var me = this;

if (Ext.isString(cmp)) {
cmp = me.lookupItemFromString(cmp);
} else if (Ext.isObject(cmp)) {
cmp = me.lookupItemFromObject(cmp);
}

// Apply our minWidth to all of our child components so it's accounted
// for in our VBox layout
cmp.minWidth = cmp.minWidth || me.minWidth; /// Line: 121438

return cmp;
},
...
]


or
'undefined' is null or not an object ext-all-debug.js, line 84554 character 9
/////////////////////////////////////////////////////////////////////////////////////////////////////

code:
...
_AnalysisTreeStore_ = Ext.create('Ext.data.TreeStore', {
root: {
text: '<b>Content</b>',
expanded: true,
children: [...]
}

_AnalysisTreePanel_ = Ext.create('Ext.tree.Panel', {
...
store: _AnalysisTreeStore_,
...
}

_AnalysisTreePanel_.on('itemcontextmenu', onATreeContextMenu, _AnalysisTreePanel_);
_AnalysisTreePanel_.on('itemclick', onATreeClick, _AnalysisTreePanel_);
_AnalysisTreePanel_.on('itemdblclick', onATreeDClick, _AnalysisTreePanel_);
_AnalysisTreePanel_.on('checkchange', onATreeCheckBoxChange, _AnalysisTreePanel_);

function onATreeContextMenu(view, n, item, index, e, options){
//e.preventDefault();
// the handler works fine at commenting out Ext.create('Ext.menu.Menu', {...})
Ext.create('Ext.menu.Menu', {
items:[
{text: 'Some Entry for '},
{text: 'Another Entry ' + n.data.id },
]
}).showAt(e.getXY());
e.stopEvent();
}
...
//////////////////////////////////////////////////////



mxu

tryanDLS
25 Jul 2011, 6:55 AM
Is this one a dup of http://www.sencha.com/forum/showthread.php?141473-IE-bug-at-EXt.menu.Menu-on-tree-panel-using-Ext-4.0.2a

mike.estes
25 Jul 2011, 9:47 AM
it does appear to be a dup, both bug reports seem to actually be a problem with trailing commas rather than bugs in the framework.