Skip to content
This repository has been archived by the owner on Mar 23, 2019. It is now read-only.

when placing flex swf in a centered div ( where flex is not 100% of the page) the iframe posiitioning is off in IE7 #15

Open
nicoulaj opened this issue May 2, 2011 · 0 comments
Labels

Comments

@nicoulaj
Copy link
Member

nicoulaj commented May 2, 2011

Originally filed by [email protected] on 2010-11-17T11:47:32

What steps will reproduce the problem?

  1. Create a div with text-centered ( for ie7/ie8)
  2. place flash file in the div and set flex application layout to "absolute"
  3. create iframe in a container inside the flash file

What is the expected output?

iframe should position over the flex application relative to its container.

What do you see instead?

iframe is all the way to the left outside of the container.

What version of Flex-IFrame are you using?

1.4.6

On what operating system and
which navigator (specify the version too)?

Windows 7, IE7 ( IE8 with IE7 compatibility mode turned on)

Did you follow the users guide ? Particularly, did you set "wmode" to
"opaque" ?

yes

Please provide any additional information below, and a sample Flex 3
project reproducing the issue if possible.

The offset property in IE7 is being reported as 0 when the parent div is centered using text-center in the movieframe function of the library.

We have "hacked" our local copy since we use jquery to fix this ( not suggesting this is a long term fix for the actual library)

IFrameExternalCalls.as

INSERT_FUNCTION_MOVEIFRAME

I changed the offset javascript to use jquery ( since we have it in our project) as follows :

from :

"var swfObject = document.getElementById(objectID); " +
"frameRef.style.left = x + swfObject.offsetLeft + 'px'; " +
"frameRef.style.top = y + swfObject.offsetTop + 'px'; " +

to :

"var swfObjectOffset = $('#' + objectID).offset(); " +
"frameRef.style.left = x + swfObjectOffset.left + 'px'; " +
"frameRef.style.top = y + swfObjectOffset.top + 'px'; " +

this fixes the issue for me, but of course since the flex iframe is pure js it will need some "special" IE7 tweaking if you're not using jquery.

Cheers
Grant

bluetubeinteractive

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant