Closed Bug 219571 Opened 21 years ago Closed 21 years ago

document.body.scrollHeight returning wrong value

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows NT
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: xavier.loup, Unassigned)

Details

(Keywords: regression, testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.5) Gecko/20030916
Build Identifier: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.5) Gecko/20030916

I have the script which test if the page is longer than the window

// if (document.body.scrollHeight > document.body.clientHeight) {
// }

This script works fine with Mozilla 1.4 but fails with 1.5 RC1.
document.body.scrollHeight is always equal to document.body.clientHeight

This bug could be a duplicate of bugs 201803 and 209807

The size of the window is checked by many scripts.
The fact that it returns wrong values could create many bugs.

Reproducible: Always

Steps to Reproduce:
I think this regression is due to the fix for bug 211030.
I changed my code to use document.documentElement (instead of document.body) and
it works now. 
Eiffel, what should we do with this bug? Is it really a bug, or just a
consequence of the fix for bug 211030? Please let us know, and resolve the bug
appropriately, thanks in advance!
Attached file Testcase
Keywords: regression, testcase
Sorry, i'm not able to decide alone if it's a regression or the consequence of a
fix.
It's ok for me to close this bug, because i have found another way to obtain the
data i need (document.documentElement).
The two values are different when there is enough content that we create
vertical scrollbars; otherwise they are the same.  That's consistent with
mapping body to the documentElement in quirks mode... so I don't see what the
bug is.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Component: DOM: Mozilla Extensions → DOM
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: