Ticket #1573 (new defect)
IE8 + doctype adds extra style attribute
| Reported by: | guest | Owned by: | gogo |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Xinha Core | Version: | trunk |
| Severity: | normal | Keywords: | doctype, ie8, internet exporer 8, style attribute |
| Cc: |
Description
I noticed that a fresh Xinha implementation displays some odd behaviour.
When loading Xinha on the following element:
<textarea id="textareaId" name="textareaId" style="width: 400px; height: 400px;">
<a href="/my/link.html" id="player" style="width: 200px; height: 200px;">Link text</a>
</textarea>
And then toggling the HTML source via the Xinha button, the html had been transformed into the following:
<a id="player" style="player" href="/my/link.html" style="width: 200px; height: 200px">Link text</a>
As you can see, an extra style attribute has been added with a value of the elements ID, effectively rendering the already present style attribute useless.
This behaviour is only present in IE8 when there is a doctype present. Remove the doctype and all works fine.
Works correctly in: IE6, IE7, FF3.5.8, IE8 (without doctype)\
Broken in: IE8 + doctype
Xinha version: Xinha 0.96.1 (2010-05-12)
Used code: Taken from http://trac.xinha.org/wiki/NewbieGuide (see attached file)
