Internet Explorer 中的 jQuery UI 对话框和 maxHeight
这是我当前的代码:
$("#DialogScroll").dialog({
bgiframe: true,
autoOpen: false,
maxHeight: 600,
width: 550,
modal: true,
resizable: false,
open: function (type, data) {
$(this).parent().appendTo("form");
},
close: function () { }
});
maxHeight 在 Firefox、Chrome 等中工作得很好,正如预期的那样,但 IE 7 显然有问题。有谁知道如何让 UI 对话框在 IE 中使用 maxHeight 吗?
<div id="DialogScroll" class="dialog" style="display:none; ">
<table>
<thead>
<tr>
<th>
State Code
</th>
<th>
State Name
</th>
</tr>
</thead>
<tbody>
<asp:Literal ID="litStates" runat="server" />
</tbody>
</table>
</div>
Here's my current code:
$("#DialogScroll").dialog({
bgiframe: true,
autoOpen: false,
maxHeight: 600,
width: 550,
modal: true,
resizable: false,
open: function (type, data) {
$(this).parent().appendTo("form");
},
close: function () { }
});
maxHeight works great in Firefox, Chrome, etc. as expected, but IE 7 obviously has a problem with it. Does anyone have any idea how to get the UI dialog to use maxHeight in IE?
<div id="DialogScroll" class="dialog" style="display:none; ">
<table>
<thead>
<tr>
<th>
State Code
</th>
<th>
State Name
</th>
</tr>
</thead>
<tbody>
<asp:Literal ID="litStates" runat="server" />
</tbody>
</table>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看起来这是一个长期存在的 open jQueryUI bug - 在此链接中,评论中列出了解决方法和补丁。
Looks like it is a long standing open jQueryUI bug - at this link there's a work-around and a patch listed in the comments.
Dean 指出的链接最近更新了一个对我有用的很好的解决方法:
因此,就你的情况而言:
The link that Dean pointed to has a recent update with a great work-around that worked for me:
Therefore, in your case: