<div dir="ltr">Hi!<br>Sorry for post this question on this list but I ask at kupu list (last wednesday) without success (glups!)<br><br>Context:<br>Zope 2.7.8-final<br>Plone 2.0.5<br>Kupu 1.3.9 (the last tested version on 2.0.5)<br>
<br>This is the exact error (copied from firebug)<br>uncaught exception: [Exception... &quot;Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsISelection.getRangeAt]&quot;&nbsp; nsresult: &quot;0x80070057 (NS_ERROR_ILLEGAL_VALUE)&quot;&nbsp; location: &quot;JS frame :: <a href="http://192.168.1.38:8110/esadir/kupuhelpers.js">http://192.168.1.38:8110/esadir/kupuhelpers.js</a> :: anonymous :: line 443&quot;&nbsp; data: no]<br>
<br>Line 0<br><br>When is the error raised:<br>I try to add a button that opens a popup box with some phonetics symbols (you could see some buttons with this symbols and an edit box)<br><br>When you finish with the popup and push the ok button the error is raised (when kupu try to add the text to the editor)<br>
<br>This error is only raised by Firefox (tested on 3.0.1 version on ubuntu and windows)<br>On IE if you selected text all is ok but if there are no text selected the phonetics text is inserted at the begining of the block (&lt;p&gt; or similar) not at cursor position<br>
<br>This is the command I use to make this addition:<br><br>this.createFonetica = function(texte) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var fonetica = this.editor.getInnerDocument().createElement(&#39;span&#39;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fonetica.appendChild(this.editor.getInnerDocument().createTextNode(texte));<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fonetica.className = &#39;transcripcioFonetica&#39;;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fonetica = this.editor.insertNodeAtSelection(fonetica, 1);&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; this.editor.logMessage(_(&#39;Fonetica inserted&#39;));<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; this.editor.updateState();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return fonetica;<br>&nbsp;&nbsp;&nbsp; };<br clear="all"><br>The problems seems to be the insertNodeAtSelection but no help at google (at least I don&#39;t find no one)<br><br>Could someone point me to the correct solution?<br>
<br>Need more information?<br><br>Thank you so much!<br>-- <br>Mis Cosas<br><a href="http://blogs.sistes.net/Garito">http://blogs.sistes.net/Garito</a><br>Zope Smart Manager<br><a href="http://blogs.sistes.net/Garito/670">http://blogs.sistes.net/Garito/670</a><br>

</div>