Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/379.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Extjs窗口在IE中不能很好地显示元素_Javascript_Internet Explorer_Extjs - Fatal编程技术网

Javascript Extjs窗口在IE中不能很好地显示元素

Javascript Extjs窗口在IE中不能很好地显示元素,javascript,internet-explorer,extjs,Javascript,Internet Explorer,Extjs,我有这个密码 var main_container = Ext.create('Ext.container.Container', { xtype: 'container', id: "id_container", anchor: '100%', layout:'column', items:[ column_1, column_2, column_3 ] }) 当我调整容器的大小时

我有这个密码

 var main_container = Ext.create('Ext.container.Container',
 {
     xtype: 'container',
     id: "id_container",
     anchor: '100%',
     layout:'column',
     items:[
        column_1,
        column_2,
        column_3
     ]
})
当我调整容器的大小时,最右边的列在某些情况下会消失。在某些情况下,当我再次调整大小时,最右边的列再次出现。这只发生在IE中

这可能是什么原因造成的?任何想法都会有帮助

这是最右边的列的结构

  var column_3 = Ext.create('Ext.container.Container',
  {
    columnWidth: .33,
    layout: 'anchor',
    id: 'column_3',
    items:[
        grid_1,
        grid_2
    ]
  })
共有3列,我希望它们的宽度为33%

按下ext js菜单按钮,主容器打开。 主容器放置在ExtJS窗口中

这是我的问题

 <div class="x-container x-column x-container-default" id="column_roles" role="presentation" style="width: 400px;">
       <DIV style="WIDTH: 413px; HEIGHT: 45%" id=grid_1 class="x-panel  x-grid x-property-grid x-panel-default x-with-col-lines x-panel-with-col-lines x-panel-default-with-col-lines x-masked-relative x-masked" role=presentation aria-labelledby=component-1234>...</div>

        <DIV style="WIDTH: 413px; HEIGHT: 45%" id=grid_2 class="x-panel  x-grid x-property-grid x-panel-default x-with-col-lines x-panel-with-col-lines x-panel-default-with-col-lines x-masked-relative x-masked" role=presentation aria-labelledby=component-1237> ... </div>
 </div>

...
... 

您可以清楚地看到,内部div比包含它们的div宽。为什么IE会产生不好的结果?这在Chrome和FF中不会发生 例如,这对我很有用:

Ext.onReady (function () {
    Ext.create ('Ext.window.Window', {
        renderTo: Ext.getBody () ,
        title: 'Win' ,
        width: 500 ,
        height: 100 ,
        layout: 'anchor' ,
        resizable: true ,
        items: [{
            xtype: 'container' ,
            anchor: '100%' ,
            layout: 'column' ,
            defaults: {
                layout: 'anchor'
            } ,
            items: [{
                xtype: 'container' ,
                columnWidth: .33 ,
                defaults: {
                    xtype: 'textfield' ,
                    anchor: '100%'
                } ,
                items: [{
                    fieldLabel: 'name'
                } , {
                    fieldLabel: 'surname'
                }]
            } , {
                xtype: 'container' ,
                columnWidth: .33 ,
                defaults: {
                    xtype: 'textfield' ,
                    anchor: '100%'
                } ,
                items: [{
                    fieldLabel: 'age'
                } , {
                    fieldLabel: 'place'
                }]
            } , {
                xtype: 'container' ,
                columnWidth: .33 ,
                defaults: {
                    xtype: 'textfield' ,
                    anchor: '100%'
                } ,
                items: [{
                    fieldLabel: 'nickname'
                } , {
                    fieldLabel: 'whatever'
                }]
            }]
        }]
    }).show();
});
调整窗口大小时,每列的大小也会随之调整,不会有任何列消失

再见


威尔克

这个问题相当模糊。这些柱子是如何建造的?容器是否呈现为元素,放置在另一个容器中?什么版本的Ext4?是的,extjs4。列也是Ext.container.ContainerMy point的类型,为什么要让它成为一个猜谜游戏?发布一个演示您的问题的示例。我做的事情与您相同,但区别在于我在创建主容器之前创建了列。创建顺序可能有问题吗?我试过你的测试,但效果一样。现在我无法测试IE,因为我在Linux机器上工作,我太懒了,无法模仿它。不过,如果它在任何浏览器上都适用,请在Sencha论坛上询问它是否是一个bug。也许,在IE上,列布局的处理方式不同。。。。我不知道,对不起,好的。我通过HTML代码查看了IE9中的主容器,发现第三列的宽度比我放入列容器中的组件小10-13像素。这是什么原因造成的?这只发生在IE.FF和镀铬工艺中,宽度和百分比都很好。