简体   繁体   English

IE中的ExtJS可折叠面板

[英]ExtJS collapsible panel in IE

I have a collapsible panel and when I open it in IE (v 11)/Edge, it collapses again. 我有一个可折叠面板,当我在IE(v 11)/ Edge中打开它时,它再次折叠。 The code is working fine in Chrome, Firefox. 该代码在Chrome,Firefox中正常运行。

I created a sample, you can try in sencha fiddle : 我创建了一个样本,您可以尝试sencha小提琴

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) 如果我在'center'区域添加一些内容,则效果很好(当center未定义时,也会出现JS错误)

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; 通过重写Ext.panel.PanelplaceholderExpand函数并替换center.hidden = false; row with center && center.hidden = false; center && center.hidden = false; the problem is resolved. 问题已解决。 (Maybe they forgot to check, where hidden is set to true, there is a check) (也许他们忘了检查,其中hidden设置为true,有检查)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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