Skip to main content

Bug Tracker

Side navigation

#13333 closed bug (notabug)

Opened January 27, 2013 02:47AM UTC

Closed January 27, 2013 02:48AM UTC

$(window).innerHeight() returns wrong value in FF 18.0.1

Reported by: jhg@acm.org Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.0
Keywords: Cc:
Blocked by: Blocking:
Description
<html>
  <head>
      <script src="http://code.jquery.com/jquery-1.9.0.min.js"></script>
  </head>
  <body>
    
    <script>
        var xw = window.innerWidth;
        var xh = window.innerHeight;
        document.write("<p>xw="+xw+" xh="+xh+"</p>");
        
        var jw = $(window).innerWidth();
        var jh = $(window).innerHeight();
        document.write("<p>jw="+jw+" jh="+jh+"</p>");
    </script>
  </body>
</html>


Chrome:

xw=929 xh=775

jw=929 jh=775


Firefox 18.0.1

xw=1141 xh=736

jw=1141 jh=52 <--- Height is height of contents, not window

Attachments (0)
Change History (1)

Changed January 27, 2013 02:48AM UTC by dmethvin comment:1

resolution: → notabug
status: newclosed

There's no live test, but judging by the code snippet you're in quirks mode.