Menu

#32 Inspecting with getCode() Causes Space Injection

open
nobody
None
5
2007-12-18
2007-12-18
wwarby
No

Using Firefox 2 on Windows, if I start with a codepress textarea that it completely empty and then inspect it's contents with top.mytextarea.getCode(), a space is injected into the textarea. I have traced this to line 99 of gecko.js where an empty textarea ("<br>") is replaced with "<pre> </pre>". Removing the space inside the <pre> block causes undesirable effects as does leaving the content as "<br>".

Also, when I start with a completely blank textarea, in Internet Explorer the textarea appears to have two blank lines.

CodePress is a superb tool but for the application I am developing with it this is a show stopper. A little work is needed to avoid code alterations and maintain browser consistency when the editor is empty. If I arrive at any solutions to these issues myself I will submit them here for consideration.

Discussion


Log in to post a comment.