Bug Tracker

Modify

Ticket #6746 (closed bug: duplicate)

Opened 3 years ago

Last modified 3 years ago

Wrong $(elem).height() in Mobile Safari when height is implicit

Reported by: davidhkc Owned by:
Priority: undecided Milestone: 1.4.3
Component: core Version: 1.3.1
Keywords: implicit height mobile safari webkit iphone ipad ipod Cc:
Blocking: Blocked by:

Description

Sample DOM: <div id="bar"><div>asdf</div></div>

Sample CSS: .bar { padding-top: 2px; } .bar > div { height: 30px; }

Sample code/output: $("#bar").height(); 0 $("#bar").outerHeight(); 2 $("#bar").children('div').height(); 30 $("#bar").children('div').outerHeight(); 30

On normal browsers, $("#bar").height() == 30 and $("#bar").outerHeight() == 32.

(tested in iPod/iPad)

Change History

comment:1 Changed 3 years ago by addyosmani

  • Priority set to undecided
  • Status changed from new to closed
  • Resolution set to duplicate

Duplicate of #6724. There currently appears to be a generic issue with obtaining the desired height values of elements (and the window) with Mobile Safari. Moving discussion to #6274 for this bug.

comment:2 Changed 3 years ago by addyosmani

Duplicate of #6724.

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.