为什么在测试jQueryUI可排序时会出现“Permission Denied”Firebug控制台错误?

时间:2013-03-11 22:30:05

标签: jquery jquery-ui firebug jquery-ui-sortable

在尝试使用jQueryUI测试“已连接”可排序功能时,我在Firebug控制台上遇到错误。这是我拖动表格行时收到的错误类型:

Error: Permission denied to access property 'sortableItem'
  target[ name ] = copy;

如果我关闭Firebug,可排序功能似乎工作正常。

这是我正在测试的代码:

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>ja test</title>

<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
<script>
$(document).ready(function(){
$( ".connected" ).sortable({
        items: 'tbody > tr',
        connectWith: ".connected",

        update: function(e, ui){
              // AJAX code will go here
              alert("hello"); // testing only
                }

        });
});
</script>
</head>
<body>      

<table border="0" width="50%" class="connected" id="unranked">
    <thead>
          <tr class="body-bold">
            <td>id</td>
            <td>Start Date </td>
            <td>End Date </td>
            <td>&nbsp;</td>
          </tr>
     </thead>
     <tbody id="sortableUnranked">
        <tr id="contentid-9896">
            <td>A9896</td>
            <td>2013-02-21</td>
            <td>2013-03-31</td>                 
            <td><input class="edit-button" type="button" name="edit" value="Edit"></td>         
        </tr>
     </tbody>
</table>

1 个答案:

答案 0 :(得分:0)

原来是Firebug附加组件FireQuery的当前版本。我安装了1.2版本(Firefox报告说我的所有插件都是最新版本)。当我访问FireQuery测试页面(测试FireQuery的功能):http://firequery.binaryage.com/test/时,我发现它也显示了Firebug错误,而最新版本的发行说明1.3表示更改是为了修复相关问题到Firefox安全模型。当我安装FireQuery 1.3时,FireQuery测试页面没有错误,我的脚本也是如此。