Marquee doesn't properly handle DOM manipulation of its contents

NEW
Unassigned

Status

()

Core
Layout
7 years ago
6 years ago

People

(Reporter: Joshua Seigler, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b12) Gecko/20100101 Firefox/4.0b12
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b12) Gecko/20100101 Firefox/4.0b12

The marquee tag determines the animation based on the width of its contents once the page is loaded. If for Javascript replaces the contents of the marquee with something of a different width, the marquee continues to animate with the original width calculation.

Reproducible: Always

Steps to Reproduce:
Start with an HTML page with a marquee tag, with very short contents. Default for marquee is behavior=scroll, direction=left. Use Javascript, modify the contents of the marquee tag to something with greater width than before.
Actual Results:  
The new text will reset to the right at the point where the original text had just finished scrolling off the left edge of the marquee.

Expected Results:  
The new text should scroll all the way off before reappearing from the right edge.

If the new text is shorter, the old text will be invisible (presumably scrolling too far to the left) until the old text would have reappeared from the right side.
This could be fixed for the case where .innerHTML, appendChild, etc is called on the marquee element itself.
Or we could use DOMNodeInserted, DOMNodeRemoved event handlers, but that could have an impact on performance.

Updated

7 years ago
Version: unspecified → 4.0 Branch
Duplicate of this bug: 805356
From duped bug, this is a testcase for innerHTML: https://bugzilla.mozilla.org/attachment.cgi?id=675011
Status: UNCONFIRMED → NEW
Component: General → Layout
Ever confirmed: true
OS: Windows 7 → All
Product: Firefox → Core
Hardware: x86_64 → All
Version: 4.0 Branch → Trunk
You need to log in before you can comment on or make changes to this bug.