Open Bug 363215 Opened 18 years ago Updated 2 years ago

A floating div created in JavaScript doesn't move when it has to

Categories

(Core :: DOM: Core & HTML, defect, P5)

defect

Tracking

()

UNCONFIRMED

People

(Reporter: zebrian, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.8.1) Gecko/20061010 Firefox/2.0

Two divs are first created with JavaScript.

The first is inserted with the command :
document.body.insertBefore(obj,document.body.childNodes[0]);
instead of document.body.appendChild(obj);

The second is inserted with the classic appendChild command but its style property "overflow" is set to "auto".

Then, a small time after creating the divs, the height of the first div is changed : the first stays fixed ! A simple click with the middle button of the mouse makes it move at the good place...

Reproducible: Always

Steps to Reproduce:
1. See how the divs appear
2. See how they should appear (document.body.innerHTML will be displayed in a dialog box)
3.

Actual Results:  
The second div is not located where it should be


I've noted that Firefox adds useless spaces between divs when you use the DOM functions so that should be one of the reasons of the bug.

The bugs still exists in Firefox 3.0 Alpha 1
Assignee: nobody → general
Component: General → DOM
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk
Assignee: general → nobody
QA Contact: ian → general
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.