Skip to main content

Bug Tracker

Side navigation

#12845 closed bug (duplicate)

Opened November 04, 2012 04:13PM UTC

Closed November 04, 2012 05:46PM UTC

$(window).height() do not return the right window size

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


jQuery 1.8.2 have a small bug with viewport size ($(window).height()). The height returned is the one of the document. I do not reproduced the problem with 1.4.2, I did not try with other version. I reproduce the problem on chrome and firefox.

Please to reproduce the problem try this code and on the browser console try :$(window).height().

			.floating {
				margin: 5px;
				float: left;
		<script type="text/javascript" src=""></script>
		<a href="#" class="floating">
			<img src="" />
		<a href="#" class="floating">
			<img src="" />
                <!-- copy the link many times -->

To fix my problem I used "document.body.clientHeight" which give the correct size of the viewport.

Best regards,

Attachments (0)
Change History (1)

Changed November 04, 2012 05:46PM UTC by mikesherov comment:1

resolution: → duplicate
status: newclosed

Duplicate of #12284.