Bug Tracker

Ticket #3838 (closed bug: wontfix)

Opened 6 years ago

Last modified 2 years ago

$(document).height() incorrect in IE6

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

Description

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

Change History

comment:1 Changed 6 years ago by john

Which version of jQuery does this occur in?

comment:2 Changed 5 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 4 years ago by dmethvin

  • Status changed from new to open

We need a test case for this.

comment:4 Changed 3 years ago by john

  • Status changed from open to closed
  • Resolution set to invalid
  • Milestone 1.3 deleted

Closing due to lack of test case.

comment:5 Changed 3 years ago by scott.gonzalez

  • Status changed from closed to reopened
  • Resolution invalid deleted

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

comment:6 Changed 3 years ago by timmywil

  • Priority changed from major to low
  • Status changed from reopened to open
  • Milestone set to 1.next

comment:7 Changed 3 years ago by john

We confirmed this in a triage meeting.

comment:8 Changed 2 years ago by mikesherov

  • Owner changed from brandon to mikesherov
  • Status changed from open to assigned

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

comment:9 Changed 2 years ago by mikesherov

  • Summary changed from $(document).height() incorrect in IE 6 to $(document).height() incorrect in IE6 + IE8

comment:10 Changed 2 years ago by mikesherov

  • Summary changed from $(document).height() incorrect in IE6 + IE8 to $(document).height() incorrect in IE6

comment:12 Changed 2 years ago by mikesherov

  • Milestone changed from 1.next to 1.7.2

comment:13 Changed 2 years ago by Mike Sherov

  • Status changed from assigned to closed
  • Resolution set to fixed

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

May still be broken in Netscape Navigator 4.

Changeset: 5cae50e66e34c277412c01ccb1c24bd6a85d2d8a

comment:14 Changed 2 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 2 years ago by dmethvin

  • Status changed from closed to reopened
  • Resolution fixed deleted
  • Milestone 1.7.2 deleted

comment:16 Changed 2 years ago by dmethvin

  • Status changed from reopened to closed
  • Resolution set to wontfix

See #11724. Firefox 12 > IE 6

comment:17 Changed 2 years ago by scott.gonzalez

Fine. Whatever. PUNK!

Note: See TracTickets for help on using tickets.