Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 10 years ago

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



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/


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 jitter

Component: unfileddimensions
Priority: undecidedlow
Status: newopen

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.

comment:2 Changed 12 years ago by Rick Waldron

#8552 is a duplicate of this ticket.

comment:3 Changed 12 years ago by Rick Waldron

Resolution: cantfix
Status: openclosed

I recently learned that Firefox doesn't grant "presentation" to elements inside of iframes set to display:none

comment:4 Changed 10 years ago by dmethvin

#14078 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.