duplicate heading and incorrect highlighting when adding a header to a nested span element created with Javascript

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
14 years ago
10 years ago

People

(Reporter: email.cfaun, Assigned: bugzilla)

Tracking

1.7 Branch
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001 Firefox/0.10.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001 Firefox/0.10.1

With the following example code:

<html><head>
    <script>
      function init() {
        var a = document.getElementById("a");
        var headA = document.createElement("h2");
        headA.appendChild(document.createTextNode("Test1"));
        a.appendChild(headA);
        var spanA = document.createElement("span");
        spanA.setAttribute("id","spanA");
        a.appendChild(spanA);
        var idA = document.getElementById("spanA");
        var headSubA = document.createElement("h4");
        headSubA.appendChild(document.createTextNode("Test 2"));
        idA.appendChild(headSubA);
      }
    </script>
  </head>
  <body onload="init();">
    <span id="a">
    </span>
  </body>

After launching it with firefox (or with Mozilla 1.7), there are two problems:

A) The second "Test1" should not exist
B) When highlighting the second "Test1" with the mouse by dragging, the first
"Test1" is highlighted

Reproducible: Always
Steps to Reproduce:
1. Enter the above example Code
2. View code with browser
3. Try highlighting third header

Actual Results:  
A mysterious duplicate of "Test1" appears and when highlighting the mysterious
duplicate, the first "Test1" is highlighted.

Expected Results:  
The second "Test1" should not have appeared to begin with.

I am using the defeault theme. There are no special build options, I simply
downloaded the binary of the firefox preview release.

Comment 1

14 years ago
This WFM on the trunk, it sounds like something that was fixed between the time
1.7/aviary branched and now.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Component: General → DOM: Core
OS: Linux → All
Product: Firefox → Browser
Resolution: --- → WORKSFORME
Version: unspecified → 1.7 Branch

Updated

10 years ago
Component: DOM: Core → DOM: Core & HTML
QA Contact: general → general
You need to log in before you can comment on or make changes to this bug.