Side navigation
#2894 closed bug (fixed)
Opened May 18, 2008 09:30AM UTC
Closed April 22, 2009 02:27AM UTC
Last modified March 14, 2012 04:34PM UTC
.width() .height() don't work correctly in iframes
Reported by: | boemer | Owned by: | brandon |
---|---|---|---|
Priority: | major | Milestone: | 1.2.4 |
Component: | dimensions | Version: | 1.2.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
[first]
I'm doing the following: $(document).width();
Where document, is inside an iframe.
In Firefox, Safari, Opera it returns the correct width (the same value as window.innerWidth;
In IE it returns me the total clientWidth of the main window. Not the width of the iframe (the iframe has a left of 130px for example).
[second]
I'm doing the following: $(document).height();
In Firefox, Safari it gives me the correct height of the iframe.
In Opera it returns a small number, where window.innerHeight returns the correct value.
In IE document.body.clientHeight returns the wrong number, but $(document).height() returns the whole window height, not the iframe height.
Okay found the problem with IE, seems to be a bug in my design and not jquery.
The Problem with Opera stays:
$(document).height() returns a wrong value in Opera, where window.innerHeight returns the correct value.