3

编辑:刚刚在更多浏览器中对其进行了测试,它也发生在 Opera、IE 9 和 Firefox 中。它似乎在 jsbin、jsfiddle 等网站上运行良好……但如果您只是使用该代码创建一个 HTML 文件并在浏览器中运行它,那么问题就会发生。

基本上给出以下代码:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>jQuery UI Dialog - Default functionality</title>
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css" />
  <script>
  $(function() {
    $( "#dialog" ).dialog();
  });
  </script>
</head>
<body>
 <br><br><br><br><br><br><br><br><br><br><br><br>
 <br><br><br><br><br><br><br><br><br><br><br><br>
 <br><br><br><br><br><br><br><br><br><br><br><br>
 <br><br><br><br><br><br><br><br><br><br><br><br>
 <br><br><br><br><br><br><br><br><br><br><br><br>
 <br><br><br><br><br><br><br><br><br><br><br><br>
<div id="dialog" title="Basic dialog">
  <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
</body>
</html>

当页面滚动到顶部时,对话框将正常工作。但是,您向下滚动页面越远,当您尝试使用句柄移动对话框时,它会向下跳转页面的量与您滚动的量大致相同。

4

1 回答 1

2

该错误似乎已在 jQuery ui 1.10.3 中引入。当我切换回 1.10.2 时,对话框运行正常。

几周前开了一张票:http: //bugs.jqueryui.com/ticket/9315

于 2013-06-14T00:13:07.900 回答