Bug Tracker

Opened 14 years ago

Closed 11 years ago

Last modified 11 years ago

#3838 closed bug (wontfix)

$(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:

Description

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

Change History (17)

comment:1 Changed 14 years ago by john

Which version of jQuery does this occur in?

comment:2 Changed 14 years ago by brandon

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

comment:3 Changed 12 years ago by dmethvin

Status: newopen

We need a test case for this.

comment:4 Changed 12 years ago by john

Milestone: 1.3
Resolution: invalid
Status: openclosed

Closing due to lack of test case.

comment:5 Changed 12 years ago by scottgonzalez

Resolution: invalid
Status: closedreopened

The document has no content, so the document height should match the window height: http://temp.nemikor.com/height.html

comment:6 Changed 12 years ago by Timmy Willison

Milestone: 1.next
Priority: majorlow
Status: reopenedopen

comment:7 Changed 12 years ago by john

We confirmed this in a triage meeting.

comment:8 Changed 11 years ago by mikesherov

Owner: changed from brandon to mikesherov
Status: openassigned

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

comment:9 Changed 11 years ago by mikesherov

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

comment:10 Changed 11 years ago by mikesherov

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

comment:12 Changed 11 years ago by mikesherov

Milestone: 1.next1.7.2

comment:13 Changed 11 years ago by Mike Sherov

Resolution: fixed
Status: assignedclosed

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

May still be broken in Netscape Navigator 4.

Changeset: 5cae50e66e34c277412c01ccb1c24bd6a85d2d8a

comment:14 Changed 11 years ago by David

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 (http://pastebin.com/MaUuLjU2) 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.

comment:15 Changed 11 years ago by dmethvin

Milestone: 1.7.2
Resolution: fixed
Status: closedreopened

comment:16 Changed 11 years ago by dmethvin

Resolution: wontfix
Status: reopenedclosed

See #11724. Firefox 12 > IE 6

comment:17 Changed 11 years ago by scottgonzalez

Fine. Whatever. PUNK!

Note: See TracTickets for help on using tickets.