Skip to main content

Bug Tracker

Side navigation

#14368 closed bug (wontfix)

Opened September 17, 2013 04:06PM UTC

Closed October 18, 2013 02:38PM UTC

height() does not convert units in Chrome

Reported by: anonymous Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:
Description

Under some circumstances, height() does not convert units to pt

http://jsfiddle.net/nradisch/ugvGv/

Attachments (0)
Change History (4)

Changed September 18, 2013 02:55AM UTC by dekajp comment:1

I am not sure if this will be helpful. I added the element aa and bb to document and jquery height returns the right result. http://jsfiddle.net/dekajp/ugvGv/6/ (tested in chrome)

and the documentation of height says "Get the current computed height" - http://api.jquery.com/height/

Changed September 29, 2013 10:44PM UTC by ziogaschr@gmail.com comment:2

This doesn't seem like a bug to me as what you achieved with jQuery works the same using only html.

You can check the html markup changes here http://jsfiddle.net/ugvGv/7/

The container <div> has a font-size set in 'pt' unit, and by that all the child elements height are affected when using 'ex' unit for its height.

ex = one ex is the x-height of a font (x-height is usually about half the font-size)

Changed September 30, 2013 01:02AM UTC by dmethvin comment:3

Getting style information on disconnected markup is dicey. That's particularly true since many inherited properties won't be available from the document on disconnected markup. I'm inclined to mark this wonfix since the "fix" is to attach it to the document before doing these measurements and it's better for you to do that.

Changed October 18, 2013 02:38PM UTC by timmywil comment:4

resolution: → wontfix
status: newclosed