#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: |
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.
Change History (5)
comment:1 Changed 12 years ago by
Component: | unfiled → dimensions |
---|---|
Priority: | undecided → low |
Status: | new → open |
comment:3 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
Add margin after checking width. Add tests. Fixes #9441. Fixes #9300.
Changeset: 80ad14bd14467c547c2867f2677ca581aa29bf33
comment:4 Changed 12 years ago by
@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
It is likely to make it after some more review. Thanks for your work!