Closed Bug 475034 Opened 13 years ago Closed 13 years ago

Rearranging order of HTML tags (a and div) sporadically.


(Firefox :: General, defect)

Windows XP
Not set





(Reporter: josephmarty, Unassigned)




User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090123 Minefield/3.2a1pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090123 Minefield/3.2a1pre

Firefox seems to be randomly switching the order of two HTML tags.  One is an A tad, which is supposed to contain a div tag.  Sporadically, Firefox will render the DIV tag containing the A tag instead (as judged by firebug) even though the source will consistently show them in the correct order.

This only seems to happen with the tags at a specific position in the file for some reason, hence all the commented periods in my sample file.

My sample file is linked to a CSS file that styles the A tags white, and the DIV tags gray.  So when displayed correctly, all the words on the page should display as gray.

Reproducible: Sometimes

Steps to Reproduce:
1. Visit
2. Reload until the word "tables" turns white - this is the incorrect behavior.
Actual Results:  
The word tables is displayed as white - apparently because it is contained in the A tag, which is contained in the DIV tag.

Expected Results:  
The word tables should look like the first two words, and be contained first in a DIV then in an A tag.
Select the text and click "View Selection Source", then you'll get the code as interpreted by the parser.

The problem here is that div/block elements are not allowed inside of a elements, even though you can actually write code like this. And that sometimes confuses our parser, so I recommend writing valid HTML.

Anyway, the problem is known, but thanks for reporting!
Closed: 13 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 324875
Well how about that.  Thank you!  (...and sorry) ;)
You need to log in before you can comment on or make changes to this bug.