[英]Vertical scroll bar appears only when I push resize corner in the dialog jQuery
I have a dialog with max-height=400px and the problem when the content height is more than 400px the vertical scroll bar doesn't appear, but when I push the resize corner of the dialog and close it, then re-open it the vertical scroll bar appears and works fine. 我有一个max-height = 400px的对话框,当内容高度超过400px时,没有出现垂直滚动条的问题,但是当我按下对话框的调整大小角并关闭它,然后重新打开它时垂直滚动条出现并且工作正常。 Any suggestions or thoughts how to solve this issue?
有什么建议或想法如何解决这个问题? here is the ui-dialog and ui-dialog-content:
这是ui-dialog和ui-dialog-content:
.ui-dialog {
max-height: 400px;
overflow: hidden;
padding: 0.2em;
position: absolute;
width: 300px;
}
.ui-dialog .ui-dialog-content {
background: none repeat scroll 0 0 transparent;
border: 0 none;
overflow: auto;
padding: 0.5em 1em;
position: relative;
}
Here is the peice of code where I use this dialog: 这是我使用此对话框的代码:
<script type="text/javascript">
function formatViewLink(cellvalue, options, rowObject) {
return "<a onClick='openDialog("+cellvalue+")'>" + '<img src="images/view_detail.png" />' + "</a>";
}
</script>
<script type="text/javascript">
function openDialog(isobolId) {
$("#selected_structs").load("${viewUrl}?isobolId="+isobolId);
$("#selected_structs").dialog('open');
}
</script>
<@sj.dialog
id="selected_structs"
title="Version Structures"
autoOpen="false"
modal="true"
width="400"
height="auto"
position="['center','top']"
>
</@sj.dialog>
I resolved the issue by changing the jquery-ui.css
file inside the struts2jquery-plugin-3.3.1.jar
. 我通过更改
struts2jquery-plugin-3.3.1.jar
的jquery-ui.css
文件解决了该问题。 in line 435 the overfolw:hidden
to overflow:auto
. 在第435行中,
overfolw:hidden
overflow:auto
。 then I empty the browser's cache and it work like charm :-). 然后我清空浏览器的缓存,它的工作方式就像是魅力:-)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.