id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
9,"Work around the ""get stuck in tags"" problem.",gogo,gogo,"Bruce Webster writes:
----
[Getting stuck inside tags is] my current problem too (and last on my list of improvements I
need to make to htmlarea) - did you find any way to fix it?  I'm going
to try and stick an &nbsp; after new tag blocks or something, but that
is easier said than done!
----

I had added something to insert a non breaking space after certain tags, Bruce  found it had some problems and submits this alternative.

----

{{{
//whack a non-breaking space after new formatblocks - to stop cursor
getting stuck inside them!
//doesn't work if you had multiple blocks selected when applying the
new formatblock
     var blocktag = editor.getParentElement();
     if (blocktag.tagName.toLowerCase()==(HTMLArea.is_ie?
param.toLowerCase().replace(/[<>]/g,'') : param.toLowerCase())) {

        blocktag.parentNode.insertBefore(editor._doc.createTextNode('\xA0'),
blocktag.nextSibling);
     }
}}}

[It] goes straight after the long switch (cmdID)  statement in HTMLArea.prototype.execCommand function.  This fixes our problem with new block styles (applied by the styles menu (h1..h6, normal, address, etc)).

----

This is a bit of a kludgy solution overall, we should see if any better way can be found.
",defect,closed,normal,,Xinha Core,,normal,inactive,,mokhet@…
