簡體   English   中英

垂直滾動條僅在我在對話框jQuery中按下調整大小角時出現

[英]Vertical scroll bar appears only when I push resize corner in the dialog jQuery

我有一個max-height = 400px的對話框,當內容高度超過400px時,沒有出現垂直滾動條的問題,但是當我按下對話框的調整大小角並關閉它,然后重新打開它時垂直滾動條出現並且工作正常。 有什么建議或想法如何解決這個問題? 這是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;
}

這是我使用此對話框的代碼:

<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>

我通過更改struts2jquery-plugin-3.3.1.jarjquery-ui.css文件解決了該問題。 在第435行中, overfolw:hidden overflow:auto 然后我清空瀏覽器的緩存,它的工作方式就像是魅力:-)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM