Closed Bug 495054 Opened 15 years ago Closed 15 years ago

CSS class incorrectly applied to self-closing DIV

Categories

(Firefox :: General, defect)

x86
Linux
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 162653

People

(Reporter: sgbeal, Unassigned)

References

()

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10

Summary: CSS styles assigned to a DIV element which is self-closing will be applied to all remaining items in the DOM at the same or deeper tree level as the self-closing DIV element.

Full details are in the Ubuntu bug db:

https://bugs.launchpad.net/ubuntu/+bug/117516

but they've asked me to re-post it here.

It's been seen in every version since at least 2.0.x.

Reproducible: Always

Steps to Reproduce:
See link above. An example demonstrating the problem is here:

http://launchpadlibrarian.net/27176943/closing-div.html

The interesting part is the second DIV block defined in that HTML.
Actual Results:  
CSS style from self-closing DIV node "leaks" out to affect elements which are not in that DIV's branch of the DOM.

Expected Results:  
CSS style should be applied only to the affected DIV element.
Attached file text/html
Attached file application/xhtml+xml
You are serving your XHTML as text/html.  According to the XHTML 1.0
specification, you may only do this if your XHTML follows the Appendix C
compatibility guidelines.

=> Duplicate of bug 162653
Attachment #379888 - Attachment mime type: application/xml+xhtml → application/xhtml+xml
Attachment #379888 - Attachment description: application/xml+xhtml → application/xhtml+xml
Attached file XHTML 1.0 Strict Test
I attached an XHTML 1.0 Strict page that did show the problem.
Attachment #379896 - Attachment mime type: text/html → application/xhtml+xml
Ah, I see, my test doesn't work either when the content type is changed.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: