Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 8 years ago

#1729 closed bug (fixed)

$(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

Change History (2)

comment:1 Changed 13 years ago by john

Owner: set to brandon

comment:2 Changed 13 years ago by brandon

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.