PDA

View Full Version : setLoading(true) gives error in IE8



ypandey
22 Oct 2012, 9:39 PM
We are using ExtJs 4.1
/*
This file is part of Ext JS 4.1
Build date: 2012-07-04 21:23:42 (65ff594cd80b9bad45df640c22cc0adb52c95a7b)
*/

We have Ext.Window with Ext Panel inside.
Whenever we setLoading(true) on panel it gives following error in IE8
-------Error-------------
SCRIPT87: Invalid argument
ext-all-debug.js, line 12267 character 21
--------------------------
Following is sample code:


var onReady = function() {
Ext.create('Ext.window.Window', {
title: 'Hello',
height: 800,
width: 800,
layout: 'fit',
items: [
{
xtype: 'panel',
title:'Panel',
margin:0,
bodyPadding: 10,
html: 'Test pamel',
listeners: {
render: function(panel) {panel.setLoading(true)},
afterrender: function(panel) {panel.setLoading(false)}
}

}
],
//renderTo: Ext.getBody()
}).show()

}
Ext.onReady(onReady);


If we remove "panel.setLoading(true)" from above code its working fine.
Is there anything wrong when we set loading on panel?

Thanks,
Rabi

ivanatora
24 Oct 2012, 12:07 AM
Same thing happens to me.

Barzoy
24 Oct 2012, 4:16 AM
IE doesn't likes when z-index CSS property is not a numeric value.
Try this fix.


Ext.ClassManager.get('Ext.LoadMask').override({
setZIndex: function(index) {
var me = this;
var owner = me.activeOwner;


if (owner) {
index = parseInt(owner.el.getStyle('zIndex'), 10);
if (isNaN(index)) {
index = 0;
}
index++;
}


me.getMaskEl().setStyle('zIndex', index - 1);
return me.mixins.floating.setZIndex.apply(me, arguments);
}
});

nareshmoorthy
1 Aug 2013, 1:56 AM
This fix seems to work. Thanks.

grandao0
29 Nov 2013, 11:37 AM
Thanks a lot, it really do the trick! B)

chrisjs
26 Feb 2014, 5:18 AM
Also have a look at this thread, as it is about the same method in LoadMask http://www.sencha.com/forum/showthread.php?228673-LoadMask-and-setZIndex-and-NaN