Side navigation
#9300 closed bug (fixed)
Opened May 16, 2011 04:34PM UTC
Closed June 07, 2011 03:39AM UTC
outerWidth(true) issue
Reported by: | jon301@gmail.com | Owned by: | timmywil |
---|---|---|---|
Priority: | high | Milestone: | 1.6.2 |
Component: | dimensions | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hello,
outerWidth(true) on a hidden element seems to return the margin of the element (without its width)
For example, if my element is 100px width and has a 10px margin-left, outerWidth(true) will return 10.
outerWidth() returns 100.
Look at this test case :
Attachments (0)
Change History (10)
Changed May 16, 2011 04:42PM UTC by comment:1
component: | unfiled → dimensions |
---|---|
milestone: | 1.next → 1.6.2 |
priority: | undecided → blocker |
status: | new → open |
Changed May 16, 2011 05:10PM UTC by comment:2
The confusing part for me is how outerWidth() returns 100 the first time. That shouldn't work either.
Changed May 16, 2011 06:18PM UTC by comment:3
owner: | → timmywil |
---|---|
status: | open → assigned |
Ok, this makes sense. The fallback is not getting applied because val is not 0 after the getWH call due to the margin addition. Will do a fix.
Changed May 23, 2011 02:07AM UTC by comment:4
_comment0: | https://github.com/jquery/jquery/pull/385 → 1306153538025839 |
---|
Changed May 25, 2011 02:34PM UTC by comment:5
blocking: | → 9417 |
---|
(In #9417) http://jsfiddle.net/timmywil/S8H2w/1/
It would be great if we could get this working, but it's not easy.
Related to #9300. This is different in that this element does not have a width set in its styles to retrieve as a fallback.
Changed May 26, 2011 12:59AM UTC by comment:6
priority: | blocker → low |
---|
Changed May 26, 2011 12:59AM UTC by comment:7
priority: | low → high |
---|
Changed May 26, 2011 01:25PM UTC by comment:8
updated pull: https://github.com/jquery/jquery/pull/393
Changed May 27, 2011 01:53AM UTC by comment:9
updated pull: https://github.com/jquery/jquery/pull/394
Well that's not good.