Closed Bug 323052 Opened 16 years ago Closed 13 years ago
A non empty BODY element triggers the *:empty CSS selector
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 While testing the CSS 3 selectors I tried the :empty selector only to find it had matched the body of the page. Reproducible: Always Steps to Reproduce: 1. Create a page with content. And use :empty as a selector. Actual Results: The BODY element was selected by the selector, (checking in the DOM inspector showed it was the BODY element and not the HEAD or HTML ones). Expected Results: The BOSY element should not be matched unless it is empty.
Source of test page.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 Just tested. Same effect.
Same here: Mozilla/5.0 (Windows; U; Win98; en-US; rv:220.127.116.11) Gecko/20060110 Firefox/18.104.22.168 Ryan Jones
Assignee: nobody → dbaron
Component: General → Style System (CSS)
OS: Windows XP → All
Product: Firefox → Core
QA Contact: general → ian
Hardware: PC → All
Version: unspecified → 1.8 Branch
*** This bug has been marked as a duplicate of 98997 ***
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
*** Bug 188953 has been marked as a duplicate of this bug. ***
I'm going to reopen this so people find it in searches since it's not obviously dynamic.
Status: RESOLVED → UNCONFIRMED
Depends on: 98997
Resolution: DUPLICATE → ---
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P1
This may not be a bug but it seems that it's more of an unfortunate side-effect; When you use :empty it get applied to emtpy tags/elements like <input/> which may not be what you want since they may have a value and shouldn't be affected. Empty should meen "no value" right? To me it's faulty behavior. But that's just me ... ;)
Whatever it is (please check the spec), it doesn't belong in this bug report.
Fixed by checkin of bug 401291, which fixed bug 98997, at 2008-02-18 22:17 -0800.
Status: NEW → RESOLVED
Closed: 16 years ago → 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta4
You need to log in before you can comment on or make changes to this bug.