Skip to main content

Bug Tracker

Side navigation

#3838 closed bug (wontfix)

Opened January 14, 2009 01:21AM UTC

Closed May 31, 2012 04:34PM UTC

Last modified May 31, 2012 04:54PM UTC

$(document).height() incorrect in IE6

Reported by: scottgonzalez Owned by: mikesherov
Priority: low Milestone:
Component: dimensions Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:

When the document is smaller than the window, $(document).height() returns a value that is slightly larger than the window.

Attachments (0)
Change History (17)

Changed January 15, 2009 02:06PM UTC by john comment:1

Which version of jQuery does this occur in?

Changed March 18, 2009 03:16AM UTC by brandon comment:2

I believe we just need to take the clientLeft and clientTop into consideration... just like we have to do in offset

Changed November 17, 2010 01:41AM UTC by dmethvin comment:3

status: newopen

We need a test case for this.

Changed April 17, 2011 06:26PM UTC by john comment:4

milestone: 1.3
resolution: → invalid
status: openclosed

Closing due to lack of test case.

Changed May 09, 2011 01:31PM UTC by scottgonzalez comment:5

resolution: invalid
status: closedreopened

The document has no content, so the document height should match the window height:

Changed May 10, 2011 08:09PM UTC by timmywil comment:6

milestone: →
priority: majorlow
status: reopenedopen

Changed July 11, 2011 05:58PM UTC by john comment:7

We confirmed this in a triage meeting.

Changed February 23, 2012 06:20PM UTC by mikesherov comment:8

owner: brandonmikesherov
status: openassigned

I'm going to see if I can whip up a quick patch for this ridiculously old bug. Be back shortly.

Changed February 23, 2012 10:28PM UTC by mikesherov comment:9

summary: $(document).height() incorrect in IE 6$(document).height() incorrect in IE6 + IE8

Changed February 23, 2012 10:36PM UTC by mikesherov comment:10

summary: $(document).height() incorrect in IE6 + IE8$(document).height() incorrect in IE6

Changed February 25, 2012 06:28PM UTC by mikesherov comment:11

Changed February 25, 2012 06:29PM UTC by mikesherov comment:12

milestone: 1.next1.7.2

Changed March 03, 2012 03:13AM UTC by Mike Sherov comment:13

resolution: → fixed
status: assignedclosed

Fix #3838, $(document).height() incorrect in IE6

May still be broken in Netscape Navigator 4.

Changeset: 5cae50e66e34c277412c01ccb1c24bd6a85d2d8a

Changed May 03, 2012 05:58PM UTC by David comment:14

I believe this fix changed the value of $(document).height() in Firefox (using 12). While in Chrome and IE9 the value is consistent.

I can't reproduce this in jsFiddle as I think the result iframe's css works around this issue but this pastebin ( will demonstrate the problem.

In 1.7.1, the scrollHeight of the body element will be returned, while in 1.7.2 the clientHeight of the html element will be returned.

Thank you.

Changed May 31, 2012 04:33PM UTC by dmethvin comment:15

milestone: 1.7.2
resolution: fixed
status: closedreopened

Changed May 31, 2012 04:34PM UTC by dmethvin comment:16

resolution: → wontfix
status: reopenedclosed

See #11724. Firefox 12 > IE 6

Changed May 31, 2012 04:54PM UTC by scottgonzalez comment:17

Fine. Whatever. PUNK!