views:

1046

answers:

3

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?

A: 

This doesn't make sense? where is the DIV element? I only see a span wrapping an input element. Can you post the generated Source or a link to the page?

scunliffe
Thanks for your reply. I got the basis of this code from a snippet at:http://dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/form-validation-specialized-input/inline-edit-boxFWIW, I don't believe a div element is necessary to create a dojo widget.
Chinnery
+2  A: 

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.

+1 Thanks for trying that out! I'm sorry to say I have not understood what's happening there.
Chinnery
+3  A: 

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.

Chinnery