jquery/jquery — pull request #764 by farmdawgnation (2012-05-04 15:42:41+00:00)
Title: Fixes #6724: Wrong $(window).height() in Mobile Safari

Greetings all,

This is my first jQuery pull request, so please do bear with me. I know I probably missed some detail in terms of style, testing, or something. :)

This is a fix for issue #6724, where the value of `$(window).height()` is always the value of the window height minus the address bar and debug console. The problem is that the value returned for `$(window).height` is accurate until you scroll. At which point the value of `window.innerHeight` is adjusted to reflect the correct height of the drawable area the Browser is using, but the `document`'s height properties are not.

This patch fixes the issue by returning `window.innerHeight` for `$(window).height()` if it exists. If it doesn't exist, it will attempt to use height parameters from document and its children. Tests for the dimensions module are passing in the latest Chrome, Firefox, and Mobile Safari.

Size changes:

```
jQuery Size - compared to last make
252813 (+26) jquery.js
94786 (+15) jquery.min.js
33650 (+15) jquery.min.js.gz
```

Let me know what I did wrong! :)