Skip to main content

Bug Tracker

Side navigation

#1729 closed bug (fixed)

Opened September 25, 2007 04:51PM UTC

Closed September 27, 2007 12:56PM UTC

Last modified March 15, 2012 12:13AM UTC

$(window) .height() returns $(document) .height() in Mozilla

Reported by: acharlier Owned by: brandon
Priority: major Milestone: 1.2.2
Component: core Version: 1.2.1
Keywords: Cc:
Blocked by: Blocking:
Description

For opera and mozilla, innerHeight should be used instead of clientHeight.

The problem comes with dimensions 1.1.2.

(version 1.1)

if (( $.browser.mozilla || $.browser.opera)&& ...

(version 1.1.2)

if ( $.browser.opera || ($.browser.safari && ...

i'd recommend

if ( $.browser.mozilla || ($.browser.safari && ...

.. and leave out opera like you did in your implementation into jquery 1.2:

return this[0] == window ? jQuery.browser.safari && self["inner" + name]

confer

http://groups.google.com/group/jquery-dev/browse_thread/thread/1884fa6ed308f40

mozilla/5.0 (windows; u; windows nt 5.1; en-us; rv:1.8.1.6) gecko/
20070725 firefox/2.0.0.6
self.innerHeight = 548
document.documentElement.clientHeight = 2016
Attachments (0)
Change History (2)

Changed September 26, 2007 10:02PM UTC by john comment:1

owner: → brandon

Changed September 27, 2007 12:56PM UTC by brandon comment:2

resolution: → fixed
status: newclosed