admin管理员组文章数量:1392088
I have the following ExtJS Panel embedded in another Panel, which then resides in a TabPanel and the TabPanel is in a FormPanel.
With that being said, these start/end date fields are initially displayed in very small cells -- the cells are so small that I see horizontal scroll bars. Now here's the weird part: if I open Firebug, everything pops into place.
Does anyone know what's going on? Why isn't it rendering properly in the first place and why does Firebug cause everything to work properly simply by opening Firebug?
var dateFields = new Ext.Panel({
id: 'dateFields',
labelAlign: 'bottom',
border: false,
items: [{
layout: 'column',
defaults: {
columnWidth: 0.5
},
items: [{
layout: 'form',
border: false,
items: [{
xtype: 'datefield',
name: 'start_date',
fieldLabel: 'Start Date'
}]
}, {
layout: 'form',
border: false,
items: [{
xtype: 'datefield',
name: 'end_date',
fieldLabel: 'End Date'
}]
}]
}]
});
I have the following ExtJS Panel embedded in another Panel, which then resides in a TabPanel and the TabPanel is in a FormPanel.
With that being said, these start/end date fields are initially displayed in very small cells -- the cells are so small that I see horizontal scroll bars. Now here's the weird part: if I open Firebug, everything pops into place.
Does anyone know what's going on? Why isn't it rendering properly in the first place and why does Firebug cause everything to work properly simply by opening Firebug?
var dateFields = new Ext.Panel({
id: 'dateFields',
labelAlign: 'bottom',
border: false,
items: [{
layout: 'column',
defaults: {
columnWidth: 0.5
},
items: [{
layout: 'form',
border: false,
items: [{
xtype: 'datefield',
name: 'start_date',
fieldLabel: 'Start Date'
}]
}, {
layout: 'form',
border: false,
items: [{
xtype: 'datefield',
name: 'end_date',
fieldLabel: 'End Date'
}]
}]
}]
});
Share
Improve this question
edited Jan 8, 2016 at 11:13
Abdul Rehman Yawar Khan
1,0873 gold badges17 silver badges40 bronze badges
asked Aug 20, 2010 at 19:30
HuuuzeHuuuze
16.4k26 gold badges75 silver badges91 bronze badges
1
- I assume any reflow will do the same, not just opening Firebug. Try resizing the browser, does it do the same thing? – Brian Moeskau Commented Aug 20, 2010 at 21:52
3 Answers
Reset to default 1I have seen this issue before... There are three things you may need to do.
- If the parent panel that contains the datefields panel is a FormPanel, set deferredRender : true
- On your tab panel, set layoutOnTabChange: true <-- I'm guessing that the datefields panel is not the default active panel right?
- On your code above, give datefields Panel a layout : 'fit". This is so that it can manage the panel with the column layout better
Your outer Panel has no layout. Try adding layout:'fit'
to it and see if that helps.
Try with chrome, if it works, may be you left a console.log
somewhere in your code.
When firebug is open, console
exists.
When it is closed, console
does not exist, and console.log
breaks the code silently.
本文标签: javascriptExtJS panel does not render properly unless I open FirebugStack Overflow
版权声明:本文标题:javascript - ExtJS panel does not render properly unless I open Firebug? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744781914a2624765.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论