Setting Focus....

S

Stefano

Hi,

i am writting a WysaWyg editor for Mozilla and i have a problem with
selection.
When i replace a node, the focus is lost and i want to set focus but
i don't get selection by my code.

Before:
<p>blah <b>blah blah blah</b><a>blah blah</a>blah blah bl blahah</p>


After:
<h2>blah <b>blah blah blah</b><a>blah blah</a>blah blah bl blahah
</h2>


var x=select_doc.focusNode;
var x1=select_doc.anchorNode;
nodep.replaceChild(el,node);

select_doc.collapse(x1,0);


So, can i select at old focus?
Thanks Stefano
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top