Closed
Bug 460838
Opened 16 years ago
Closed 16 years ago
Changing innerHTML of the <div> tag, which is inside <a> tag adds automatically <a> tag around the text.
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
DUPLICATE
of bug 381808
People
(Reporter: nikita.petrovs, Unassigned)
References
()
Details
Attachments
(1 file)
258 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 Changing innerHTML of the <div> tag, which is inside <a> tag adds automatically <a> tag around the text. Haven't tried with different tags but might be affected too. Reproducible: Always Steps to Reproduce: Here's test html code: <script> window.onload = function () { alert(document.getElementById('d').innerHTML); document.getElementById('d').innerHTML = "123"; alert(document.getElementById('d').innerHTML); } </script> <body> <a href=""> <div id="d">test</div> </a> </body> Open in FF. You'll get two alert boxes. Second is wrong. It shouldn't have <a> tag around "123"; Actual Results: First alert box shows "test", second shows "<a>123</a>". Expected Results: First alert box shows "test", second shows "123" without the <a> tag around.
Comment 1•16 years ago
|
||
Updated•16 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•