Control character is not being removed inside SCRIPT tags or HEAD when switching from textmode to htmlmode.
|Reported by:||guest||Owned by:||gogo|
The control character that keeps track of the cursor position when switching from textmode to htmlmode is not being removed when the cursor is somewhere inside a SCRIPT tag.
Example, (I use the pipe character (|), to indicate cursor position):
When switching back to htmlmode, the cursor position is saved by adding an extra control character in htmlcode. But apparently this control character is not being removed inside script tags.
If we switch back to text mode, we will see a space character in the script (IE 6):
In Firefox the control character is invisible in textmode, but it is there!
This bug is present in (at least) IE (version 6.3790.3959) and Firefox (version 22.214.171.124).
The problem is in the findCC method in the modules/InternetExplorer/InternetExplorer.js and modules/Gecko/Gecko.js files. This method doesn't find the control character. I think that the selection does not work inside script tags (in fac I am almost sure about that). So I think the best solution is to check if the cursor is inside a script tag (in the setCC method) and if that's the case, place the cursor right before or right after that script tag.
You can e-mail me at: joris [at] prezent [dot] nl
Change History (4)
comment:3 Changed 9 years ago by ray
- Summary changed from Control character is not being removed inside SCRIPT tags when switching from textmode to htmlmode. to Control character is not being removed inside SCRIPT tags or HEAD when switching from textmode to htmlmode.