#7928 closed bug (cantfix)
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.
Change History (4)
comment:1 Changed 12 years ago by
Component: | unfiled → dimensions |
---|---|
Priority: | undecided → low |
Status: | new → open |
comment:3 Changed 12 years ago by
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.