Side navigation
#7928 closed bug (cantfix)
Opened January 09, 2011 12:05PM UTC
Closed July 12, 2011 08:01PM UTC
Last modified July 01, 2013 09:28PM UTC
Firefox gives wrong height and width for percentage-styled elements within a hidden iframe
Reported by: | tangphillip | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | dimensions | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Setup:
An outer document that contains a
display:none-styled iframe.
An inner document that contains an element with a percentage-based style for width or height.
Sample outer document: http://jsfiddle.net/tangphillip/dnDUu/
Sample inner document: http://jsfiddle.net/tangphillip/SJACn/
Bug:
In both Firefox 3 and 4, running on either Windows or Mac, jQuery will return the
height()of the iframed element as the percentage listed in the style. For instance, if the element in the iframe had
height:40%, jQuery would say that the element is 40 pixels tall, no matter what the height actually is once the iframe is revealed. It behaves similarly with width.
Attachments (0)
Change History (4)
Changed January 17, 2011 12:52AM UTC by comment:1
component: | unfiled → dimensions |
---|---|
priority: | undecided → low |
status: | new → open |
Changed July 12, 2011 08:01PM UTC by comment:3
resolution: | → cantfix |
---|---|
status: | open → closed |
I recently learned that Firefox doesn't grant "presentation" to elements inside of iframes set to display:none
test case.
Seems reproducible on FF and Chrome (chrome has even more weird results). Needs some chross-checking with other "hidden"-width/height related tickets.