为什么 FF3 说“获取属性 HTMLDivElement.tagName 的权限被拒绝”?
当我通过 FireFox 3 运行此命令时:
<script type="text/javascript" src="../resources/dojo-1.2.3-src/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
<script type="text/javascript" src="../resources/dojo-1.2.3-src/dojo/dijit.js"></script>
<script type="text/javascript">
dojo.require("dojo.parser");
dojo.require("dijit.InlineEditBox");
dojo.require("dijit.form.TextBox");
function myHandler(idOfBox, value) {
alert("Edited value from "+idOfBox+" is now "+value);
}
</script>
<span id="editable" style="font-size:larger;" dojoType="dijit.InlineEditBox"
onChange="myHandler(this.id,arguments[0])">
<input dojoType="dijit.form.TextBox" value="dijit.InlineEditBox">
</span>
单击内联可编辑文本,更改它,然后单击它的外部,FF 说:“Permission returned to get property HTMLDivElement.tagName”
Firebug 调试器在以下行处中断,因为 e . relatedTarget 为空:
尝试{ e.relatedTarget.tagName; } catch(e2){ 返回; }
怎么做才能找到解决这个问题的方法?
When I run this through FireFox 3:
<script type="text/javascript" src="../resources/dojo-1.2.3-src/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
<script type="text/javascript" src="../resources/dojo-1.2.3-src/dojo/dijit.js"></script>
<script type="text/javascript">
dojo.require("dojo.parser");
dojo.require("dijit.InlineEditBox");
dojo.require("dijit.form.TextBox");
function myHandler(idOfBox, value) {
alert("Edited value from "+idOfBox+" is now "+value);
}
</script>
<span id="editable" style="font-size:larger;" dojoType="dijit.InlineEditBox"
onChange="myHandler(this.id,arguments[0])">
<input dojoType="dijit.form.TextBox" value="dijit.InlineEditBox">
</span>
and click on the inline editable text, change it, and then click outside of it, FF says this: "Permission denied to get property HTMLDivElement.tagName"
The Firebug debugger breaks at the following line because e.relatedTarget is null:
try{ e.relatedTarget.tagName; } catch(e2){ return; }
What can I do to find a fix for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此问题似乎是由 Firefox 的 Firebug 扩展引起的。 我这么说是因为当我禁用Firebug并使用该控件时,它可以正常工作。
This problem appears to be caused by the Firebug extension to Firefox. I say that because when I disable Firebug and use the control, it works normally.
是的,我自己尝试过,但它对我有用,至少针对最新的代码。 (我在 FF3/mac 上运行。)
您提到的 try/catch 可能是一个转移注意力的问题,因为已经有一个忽略任何错误的 catch 处理程序设置。
Yah, I tried it myself but it's working for me, at least against the latest code. (I'm running on FF3/mac.)
The try/catch you mention may be a red-herring as there's already a catch handler setup that ignores any errors.