我正在使用jQuery 1.10.1與遷移,jQueryUI 1.10.3,jQueryValidate 1.11.1。jQuery UI 1.10.3對話框,拖動對話框
只要使用簡單的形式,它有兩個字段。如果未提供值,請在提交時顯示一個對話框並顯示消息。
Issue:在IE 10中當用戶嘗試移動(拖動)錯誤消息對話框時,它會向下移動。這隻有在瀏覽器窗口中出現垂直滾動條時纔會發生。 在Chrome 27中驗證了它的效果。有時會在Firefox 21和Opera 12.15中出現相同的問題。
注意:它與jQuery UI 1.10.2正常工作,唯一的問題是在1.10.3中有問題。
樣品來源
<html>
<head>
<style type="text/css">
.label {width:100px;text-align:right;float:left;padding-right:10px;font-weight:bold;}
.label1 {width:350px; text-align:right; padding-top:300px;padding-bottom:30px; font-weight:bold; }
</style>
<link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<!-- <script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.2/jquery-ui.min.js"></script> -->
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.3/jquery-ui.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
<script>
$(function() {
$("#register-form").validate({
rules: { firstname: "required", lastname: "required" },
messages: { firstname: "Need First Name", lastname: "Need Last Name" },
showErrors: function(errorMap, errorList) {
$("#diverror").dialog({ modal: true });
},
submitHandler: function(form) {
form.submit();
}
});
});
</script>
</head>
<body>
<form method="post" id="register-form">
<div class="label">First Name</div><input type="text" id="firstname" name="firstname" /><br />
<div class="label">Last Name</div><input type="text" id="lastname" name="lastname" /><br />
<div class="label1">Making page to scroll. Scroll down to submit</div>
<div class="label1">Making page to scroll. Scroll down to submit</div>
<div class="label1">Making page to scroll. Scroll down to submit</div>
<div style="margin-left:140px;"><input type="submit" name="submit" value="Submit" /></div>
</form>
<div id="diverror" title="Basic dialog"><p>This is the default DIVERROR which is useful for displaying information.</p></div>
</body>
</html>
哎呀我現在失去了2小時後,同樣的問題,得到了問題的鍍鉻! – Ali
此問題已在** jQuery UI 1.10.4 **中修復。 – Rajeev