Skip to main content

Bug Tracker

Side navigation

#13443 closed bug (duplicate)

Opened February 13, 2013 09:37AM UTC

Closed February 15, 2013 05:34PM UTC

Last modified February 26, 2013 08:14PM UTC

Height of window reported incorrectly

Reported by: Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Good day. I have downloaded the latest version of jquery (1.9.1) and noticed a problem about the height of the window. In my script I have alert($(window).height()) and it constantly reports 211, no matter how smaller or larger i make it. The strange thing is that yesterday was working correctly. Today, all of the sudden is not. To test my code, I have downgraded from 1.9.1 to 1.6.3 (1.8 still had the problem) and alert($(window).height()) now reports correctly. Please fix it.

Attachments (0)
Change History (3)

Changed February 15, 2013 05:30PM UTC by comment:1

I've also noticed this issue. I've tested it on Chrome (Mac) and Firefox (Mac) against every release version of JQuery in the google cdn. Here is what I found:

JQuery 1.8.0 - 1.9.1 incorrectly report the document height instead of the viewport height when calling $(window).height()

See the Error Here:

Changed February 15, 2013 05:34PM UTC by dmethvin comment:2

resolution: → duplicate
status: newclosed

Duplicate of #12388.Annnnd, you're in quirks mode.

Changed February 26, 2013 08:14PM UTC by comment:3

If you're looking at this in JSBin, document.compatMode is reported incorrectly. The following does not trigger quirks mode, and does cause the problem in at least Chrome 24.0.1312.57:

<!DOCTYPE html>
<script src=""></script>
  $(function() {
<meta charset=utf-8 />
<title>JS Bin</title>
    <li>Mode: <span id='mode'></span></li>
    <li>Pre: <span id='height'></span></li>