Skip to main content

Bug Tracker

Side navigation

#7427 closed bug (worksforme)

Opened November 07, 2010 01:48PM UTC

Closed November 07, 2010 03:03PM UTC

Last modified March 13, 2012 07:13PM UTC

chrome viewport height changes depending on document length

Reported by: anonymous Owned by:
Priority: low Milestone: 1.5
Component: dimensions Version: 1.4.3
Keywords: Cc:
Blocked by: Blocking:

Google Chrome: 7.0.517.44

jQuery: 1.4.2

Ubuntu: 10.4

The viewport height changes depending on the document length. The width stays the same (or changes because of the scrollbar that appears).

Viewport size is read using $(window).height().

See this example

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="" xml:lang="en">
        <meta http-equiv="Content-Type" content="application/xhtml+xml;charset=utf-8" />

        <script type="text/javascript" src="resources/js/jquery-1.4.2.min.js"></script>

        <script type="text/javascript">
                $(document).ready(function() {
                   $("#produce").click(function() {
                       $("#filler").css("display", "block");


                function showViewportDimensions() {
                    $("#result").text("Viewport width: " + $(window).width() + "; height: " + $(window).height());
        <h1>jQuery / Chrome viewport bug</h1>
        <p id="result"></p>
        <p id="produce" style="color: red;">Produce bug</p>
        <p id="filler" style="padding: 400px 0; display: none;"></p>

Attachments (0)
Change History (1)

Changed November 07, 2010 03:03PM UTC by rwaldron comment:1

component: unfileddimensions
priority: undecidedlow
resolution: → worksforme
status: newclosed

This bug does not exist with jQuery 1.4.4rc2