Results 1 to 6 of 6

Thread: setLoading(true) gives error in IE8

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    242
    Answers
    1

    Default Answered: setLoading(true) gives error in IE8

    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:
    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

  2. IE doesn't likes when z-index CSS property is not a numeric value.
    Try this fix.
    Code:
    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);
        }
    });

  3. #2
    Sencha User
    Join Date
    Nov 2009
    Posts
    26

    Default

    Same thing happens to me.

  4. #3
    Sencha User
    Join Date
    Oct 2010
    Location
    St.Petersburg
    Posts
    40
    Answers
    4

    Default

    IE doesn't likes when z-index CSS property is not a numeric value.
    Try this fix.
    Code:
    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);
        }
    });
    Last edited by Barzoy; 24 Oct 2012 at 4:24 AM. Reason: markup fail
    Think less, write more.

  5. #4
    Ext JS Premium Member
    Join Date
    Jan 2012
    Posts
    4

    Default

    This fix seems to work. Thanks.

  6. #5
    Sencha User
    Join Date
    Nov 2013
    Location
    BHorizonte
    Posts
    2

    Default

    Thanks a lot, it really do the trick!

  7. #6
    Ext JS Premium Member
    Join Date
    Oct 2010
    Location
    Freiburg
    Posts
    24
    Answers
    1

    Default

    Also have a look at this thread, as it is about the same method in LoadMask http://www.sencha.com/forum/showthre...ZIndex-and-NaN

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •