Closed
Bug 302134
Opened 19 years ago
Closed 19 years ago
Body's borders aren't determined correctly
Categories
(Core :: Layout, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: r_rom, Unassigned)
Details
(Keywords: testcase)
Attachments
(1 file)
|
320 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
Borders of body aren't calculated correctly when applying style property border.
Reproducible: Always
Steps to Reproduce:
Create the following file.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<style>
body {
border:10px solid red;
}
</style>
<body onclick="clicked()">
<script>
function clicked()
{
alert("clicked");
}
</script>
<div>something</div>
</body>
</html>
Actual Results:
Border is drawn closely around div, not around visible page, as IE does it.
Expected Results:
Border should be drawn around visible page.
Look at the file. Even though Firefox seems to interpret the body as something
very close to the div in the sample file (or useful content), clicking far away
on the page invokes the function clicked(), which indicates that for mouse
events Firefox interprets the whole visible page as the body. One problem is
that these behaviours are inconsistent. The second problem is that I think the
body is the whole visible page, regardless how much content is on the page.
Comment 1•19 years ago
|
||
Updated•19 years ago
|
Component: General → Layout
Keywords: testcase
Product: Firefox → Core
Version: unspecified → 1.0 Branch
Comment 2•19 years ago
|
||
For HTML documents, event handlers set on the <body> are actually set on the Window object (as you can tell by looking at the currentTarget property in the handler). So the reason the event fires is that you _are_ clicking on the window. If you look at the event target, it's the <html>, not the <body>, when you click outside the red box. Which is correct. As for the sizing of the red box, it's correct. Please see the CSS specification.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Updated•19 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•