#13443 closed bug (duplicate)
Height of window reported incorrectly
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
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.
Change History (3)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Duplicate of #12388.
Annnnd, you're in quirks mode.
comment:3 Changed 10 years ago by
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> <html> <head> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script> $(function() { $('#mode').html(document.compatMode); $('#height').html($(window).height()); }); </script> <meta charset=utf-8 /> <title>JS Bin</title> </head> <body> <ul> <li>Mode: <span id='mode'></span></li> <li>Pre: <span id='height'></span></li> </ul> </body> </html>
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: http://jsbin.com/ifipoq/1/edit