简体   繁体   中英

ExtJS collapsible panel in IE

I have a collapsible panel and when I open it in IE (v 11)/Edge, it collapses again. The code is working fine in Chrome, Firefox.

I created a sample, you can try in sencha fiddle :

Ext.application({
    name : 'Fiddle',

    launch : function() {
        this.container = new Ext.panel.Panel({
            width: '100%',
            height: 500,
            title: 'Main',
            layout: 'border',
            renderTo: Ext.getBody()
        });

        this.container.add({
            xtype:'panel',
            region: 'east',
            width: 300,
            collapsible: true,
            collapsed: true,
            title: 'Collapsible'
        });
    }
});

If I add something on the 'center' region, it works fine (also gives a JS error while center is undefined)

Ext.application({
    name: 'Fiddle',

    launch: function() {
        this.container = new Ext.panel.Panel({
            width: '100%',
            height: 500,
            title: 'Main',
            layout: 'border',
            renderTo: Ext.getBody()
        });

        this.container.add({
            xtype: 'panel',
            region: 'center',
            title: 'Center',
        });

        this.container.add({
            xtype: 'panel',
            region: 'east',
            width: 300,
            collapsible: true,
            collapsed: true,
            title: 'Collapsible'
        });

    }
});

UPDATE

By overriding Ext.panel.Panel 's placeholderExpand function and replacing the center.hidden = false; row with center && center.hidden = false; the problem is resolved. (Maybe they forgot to check, where hidden is set to true, there is a check)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM