Bug Tracker

Modify

Ticket #1729 (closed bug: fixed)

Opened 6 years ago

Last modified 14 months ago

$(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:
Blocking: Blocked by:

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

comment:1 Changed 6 years ago by john

  • Owner set to brandon

comment:2 Changed 6 years ago by brandon

  • Status changed from new to closed
  • Resolution set to fixed

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.