Dialog rendering problems? - Ext JS

用户在使用ExtJS框架时遇到对话框第二次打开时显示异常的问题,表现为对话框的内容偏移且按钮不可见。初步判断可能是由于对话框被重复渲染导致。建议检查代码中是否存在同一元素上创建多个相同对话框的情况。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I'm having a problem where the second time a dialog is popped up, there's a little extra below the titlebar that pushes it down so the content is offset and the buttons are no longer visible. It is not recreated or anything, it is just hidden after the first time. The button also seems to be rendered twice down below. I'm also rewriting the internal content of the body using Ext.DomHelper.overwrite if that helps. I don't know why that would cause a rendering area with a button though. It also seems to have problems resizing, it's just the shadow that shows up on the new area.

This is also on FF2.0, will test on IE6, don't have IE7 right now to test on.

Edit: IE6 will have to wait, there's a mysterious error somewhere that's causing IE6 to puke.
Reply With Quote
  #2  
Old 03-12-2007, 03:37 PM
Default

im having this problem too, the first time i open my dialog its all ok, then i close it and when i reopen, it looks like this:



did anybody know where the problem could be?

please help
Reply With Quote
  #3  
Old 03-12-2007, 04:21 PM
Default

If you're changing the content/height of the body element, you might try calling syncBodyHeight()
__________________
Tim Ryan - Ext JS Support Team
Read BEFORE posting a question / posting a Bug
Use Google to Search - API / Forum
API Doc (3.x | 2.x | 1.x) / FAQ / Wiki / Tutorials / 1.x->2.0 Migration Guide
Reply With Quote
  #4  
Old 03-12-2007, 04:30 PM
Default

Quote:
Originally Posted by tryanDLS
If you're changing the content/height of the body element, you might try calling syncBodyHeight()
I'll try that, but mine is at a fixed height/width (well, until someone drags a corner) and has a min height/width for the dialog.

This also didn't seem to be an issue until 1.0.


Edit: Where is that syncBodyHeight at? It doesn't seem to be a part of BasicDialog.
Reply With Quote
  #5  
Old 03-12-2007, 05:46 PM
Default

It is in BasicDialog, it's just one of functions that hasn't been documented yet.
__________________
Tim Ryan - Ext JS Support Team
Read BEFORE posting a question / posting a Bug
Use Google to Search - API / Forum
API Doc (3.x | 2.x | 1.x) / FAQ / Wiki / Tutorials / 1.x->2.0 Migration Guide
Reply With Quote
  #6  
Old 03-12-2007, 11:05 PM
Default

Use the config option syncHeightBeforeShow instead of calling the private function syncBodyHeight.

However, this looks like a classic case of the dialog being duplicated (rendered twice). I would recommend looking at you code and making sure you aren't creating the same dialog twice on the same element.
Reply With Quote
  #7  
Old 03-13-2007, 12:43 AM
Default

Quote:
Originally Posted by jacksloc
Use the config option syncHeightBeforeShow instead of calling the private function syncBodyHeight.

However, this looks like a classic case of the dialog being duplicated (rendered twice). I would recommend looking at you code and making sure you aren't creating the same dialog twice on the same element.
It's late, so I won't try that tonight, but my dialog is only created once on body load, so I know it's not being created twice on the same element. Plus, if it was created twice, wouldn't it have shown it before 1.0? This problem hasn't exhibited itself until now since I haven't modified my BasicDialog code yet since I didn't think that had changed (at least enough to warrant me to look at it).
Reply With Quote
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值