【问题标题】:jquery ui dialog scrollable, can't select checkboxes at bottom of dialogjquery ui对话框可滚动,无法选择对话框底部的复选框
【发布时间】:2016-10-03 11:04:47
【问题描述】:

我有一个 jquery ui 弹出窗口,由于内容量大,需要垂直滚动条。

弹出窗口底部有一个复选框,我无法选择它,只要我尝试单击复选框,焦点就会直接跳转到弹出窗口顶部的控件。

示例代码如下

<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>

</head>

<a href="javascript:openPersonDialog();">Open the Dialog</a>

<div id="personDialog" class="ui-content" data-position-to="window" style="padding-bottom: 2em; height:400px; max-height:400px; overflow-y:auto; min-width: 600px; max-width: 600px;" data-role="popup" data-theme="a" data-overlay-theme="b" data-dismissible="false">
    <input type="hidden" autofocus="autofocus" />
    <input type="text" id="txtA" />
    <div style="height:700px; background-color:lightblue;">

    </div>
    <input id="chkA" type="checkbox" />
    <label for="chkA">Test Checkbox</label>
</div>

<script type="text/javascript">


function openPersonDialog()
{
    $('#personDialog').popup('open');
}

</script>

谁有什么想法,非常感谢你能给我的任何帮助

【问题讨论】:

    标签: jquery asp.net-mvc jquery-ui-dialog


    【解决方案1】:

    所以我继续把它放在我的本地开发盒上,它对我来说没有问题我可以检查它并取消它没有问题,你可以查看它here自己尝试。

    【讨论】:

    • 感谢您抽出宝贵时间查看我的问题@Baker,我可能没有明确说明我使用的是 jQuery mobile,因此已将其添加到我的问题中
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多