CSS class incorrectly applied to self-closing DIV

RESOLVED DUPLICATE of bug 162653

Status

()

--
minor
RESOLVED DUPLICATE of bug 162653
10 years ago
8 years ago

People

(Reporter: sgbeal, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(3 attachments)

(Reporter)

Description

10 years ago
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.

Comment 1

10 years ago
Created attachment 379886 [details]
text/html

Comment 2

10 years ago
Created attachment 379888 [details]
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

Updated

10 years ago
Attachment #379888 - Attachment mime type: application/xml+xhtml → application/xhtml+xml

Updated

10 years ago
Attachment #379888 - Attachment description: application/xml+xhtml → application/xhtml+xml

Comment 3

10 years ago
Created attachment 379896 [details]
XHTML 1.0 Strict Test

I attached an XHTML 1.0 Strict page that did show the problem.

Updated

10 years ago
Attachment #379896 - Attachment mime type: text/html → application/xhtml+xml

Comment 4

10 years ago
Ah, I see, my test doesn't work either when the content type is changed.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 162653

Updated

8 years ago
You need to log in before you can comment on or make changes to this bug.