Ticket #735 (closed defect: fixed)
IE eating javascript (again?)
| Reported by: | benDOTsimkinsATintsoftDOTch | Owned by: | gogo |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Xinha Core | Version: | trunk |
| Severity: | major | Keywords: | script tag ie sethtml textmode wysiwyg |
| Cc: |
Description
When changing from text to wysiwyg mode, IE appears to be eating my javascript, in spite of the javascript/freezescript replacement proposed by mharrisonline. Firefox works fine, haven't tried anything else.
[sob]
Just paste this
<script type="text/javascript">
alert("does it work? no it doesn't");
</script>
in text mode, in IE, and switch to wysiwyg and back, and it's not there anymore.
It is NOT a problem with getHTML() - if you save directly from textmode, it works fine. The problem occurs in setHTML() (line 5196 and following), you can demonstrate this by replacing it with the following code:
// completely change the HTML inside
HTMLArea.prototype.setHTML = function(html)
{
if ( !this.config.fullPage )
{
alert(html);
this._doc.body.innerHTML = html;
alert(this._doc.body.innerHTML);
}
else
{
this.setFullHTML(html);
}
this._textArea.value = html;
};
Did this used to work? Has someone broken something?
Change History
Note: See
TracTickets for help on using
tickets.
