Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#9441 closed bug (fixed)

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:


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.


Change History (5)

comment:1 Changed 12 years ago by timmywil

Component: unfileddimensions
Priority: undecidedlow
Status: newopen

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

comment:3 Changed 12 years ago by Mike Sherov

Resolution: fixed
Status: openclosed

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

Changeset: 80ad14bd14467c547c2867f2677ca581aa29bf33

comment:4 Changed 12 years ago by Rick Waldron

@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:


comment:5 Changed 12 years ago by timmywil

I'm showing full passes in all browsers.

Note: See TracTickets for help on using tickets.