PDA

View Full Version : script error after some items are hidden and shown



wp.joju
8 Feb 2010, 11:48 PM
i have the following top bar of a panel which is inside a viewport, the problem is after resizing the browser then the top bar items gets hidden... there is a script error when the top bar item gets shown again...

this only happens if you click on the "more" button while some of the topbar item is hidden

i'm using extjs 3.1.0





tbar:[{
text: 'Filter by Name:'
},{
xtype: 'textfield',
id: 'exttxtfilter',
selectOnFocus: true,
width: 100,
listeners: {
'render': {fn:function(){
Ext.getCmp('exttxtfilter').getEl().on('keyup', function(){
filterItems(Ext.getCmp('exttxtfilter').getValue());
}, this, {buffer:500});
}, scope:this}
}
}, ' ', '-', {
text: 'Sort By:'
}, {
id: 'extcombosortSelect',
xtype: 'combo',
typeAhead: true,
triggerAction: 'all',
width: 100,
editable: false,
mode: 'local',
displayField: 'desc',
valueField: 'name',
lazyInit: false,
value: 'name',
store: new Ext.data.ArrayStore({
fields: ['name', 'desc'],
data : [['name', 'Name'],['lastmodified', 'Last Modified']]
}),
listeners: {
'select': {fn:sortItems, scope:this}
}
}],



script error says dom is null or not an object

which appears on this part of ext-all-debug.js




addClass : function(className){
var me = this, i, len, v;
className = Ext.isArray(className) ? className : [className];
for (i=0, len = className.length; i < len; i++) {
v = className[i];
if (v) {
me.dom.className += (!me.hasClass(v) && v ? " " + v : "");
};
};
return me;
},

wp.joju
9 Feb 2010, 12:13 AM
same problem after upgrading to v3.1.1