Skip to main content

Bug Tracker

Side navigation

#6746 closed bug (duplicate)

Opened June 30, 2010 07:05PM UTC

Closed October 14, 2010 03:24AM UTC

Last modified October 14, 2010 03:24AM UTC

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

Attachments (0)
Change History (2)

Changed October 14, 2010 03:24AM UTC by addyosmani comment:1

priority: → undecided
resolution: → duplicate
status: newclosed

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.

Changed October 14, 2010 03:24AM UTC by addyosmani comment:2

Duplicate of #6724.