Skip to main content

Bug Tracker

Side navigation

#9441 closed bug (fixed)

Opened May 27, 2011 12:46PM UTC

Closed June 07, 2011 03:39AM UTC

Last modified March 09, 2012 04:06AM UTC

innerWidth, innerHeight, outerWidth, outerHeight are inaccurate for child of hidden parent

Reported by: mikesherov Owned by:
Priority: low Milestone: 1.next
Component: dimensions Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:
Description

this was discovered while I was working on #9300. #9300 fixes the outerWidth(true) case, but the rest of the dimensions functions suffer in similar ways.

This is due to the fact that the width/height fallbacks are ignorant as to whether or not the padding and border (and margin in #9300) are applied.

I should have a patch for this tomorrow, but it's based off my fix for #9300: https://github.com/jquery/jquery/pull/394 so I'll wait to see if that one is accepted before I continue.

http://jsfiddle.net/mikesherov/dQeuT/1/

Attachments (0)
Change History (5)

Changed May 27, 2011 02:59PM UTC by timmywil comment:1

component: unfileddimensions
priority: undecidedlow
status: newopen

It is likely to make it after some more review. Thanks for your work!

Changed May 28, 2011 07:26PM UTC by mikesherov comment:2

Changed June 07, 2011 03:39AM UTC by Mike Sherov comment:3

resolution: → fixed
status: openclosed

Add margin after checking width. Add tests. Fixes #9441. Fixes #9300.

Changeset: 80ad14bd14467c547c2867f2677ca581aa29bf33

Changed June 16, 2011 09:06PM UTC by rwaldron comment:4

@timmywil & @mikesherov I'm getting a lot of fails in the dimensions module, here: http://gyazo.com/0b1958b17e40106f86ad6da54d7aa0d2

I don't remember seeing any fails at all when i reviewed mikesherov's patch, https://github.com/jquery/jquery/commit/80ad14bd14467c547c2867f2677ca581aa29bf33

But I had never seen this one:

https://github.com/jquery/jquery/commit/75203de7435b7f32c69da1dde88aa6708bf6bb7d

Changed June 16, 2011 09:47PM UTC by timmywil comment:5

I'm showing full passes in all browsers.