Ext JS中的Firefox渲染问题

var win = Ext.create('Ext.window.Window', { title: "Window", modal:true, width: 570, height: 440, layout: 'card', items:[{ xtype: "panel", border: true, bodyBorder: true, title: 'Panel', bodyStyle: { "background": "linear-gradient(to left, #fff , #6799ff)" }, id: 'PanelID', items:[{ xtype: 'box', id: 'BoxID', title:'Box', width: 558, height: 325, autoEl: { tag: 'iframe' }, listeners: { 'boxready': function() { var popWindowdoc = Ext.getCmp('BoxID').el.dom.contentDocument; $(popWindowdoc.body).append('
'); $(popWindowdoc.getElementById('t')).append('This is Test'); } } }] } ] }); win.show();

这段代码在chrome中运行良好,我在窗口上收到“This is Test”。 但在Firefox中我没有得到任何文本,也没有发生错误。 我认为这是渲染问题。

任何身体让我知道如何在这种情况下获得文字?

Firefox将解释这部分代码碎片化,如果可能的话,你需要以只有一组括号的方式重构代码[{ ...}]看看有两个items如何? 那只是一件items

  items:[{ xtype: "panel", border: true, bodyBorder: true, title: 'Panel', bodyStyle: { "background": "linear-gradient(to left, #fff , #6799ff)" }, id: 'PanelID', items:[{ xtype: 'box', id: 'BoxID', title:'Box', width: 558, height: 325, autoEl: { tag: 'iframe' }, listeners: { 'boxready': function() { var popWindowdoc = Ext.getCmp('BoxID').el.dom.contentDocument; $(popWindowdoc.body).append('
'); $(popWindowdoc.getElementById('t')).append('This is Test'); } } }]