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. Any suggestions or thoughts how to solve this issue? here is the ui-dialog and 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
. in line 435 the overfolw:hidden
to overflow:auto
. then I empty the browser's cache and it work like charm :-).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.