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: | cosmin.grigoras@creditul.com | 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.
Attachments (0)
Change History (3)
Changed February 15, 2013 05:30PM UTC by comment:1
Changed February 15, 2013 05:34PM UTC by comment:2
resolution: | → duplicate |
---|---|
status: | new → closed |
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> <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