gleydson404 / flex-iframe

Automatically exported from code.google.com/p/flex-iframe
0 stars 0 forks source link

Issue 37 is not fixed for IE7 #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
See comment for issue 37

Original issue reported on code.google.com by andr....@gmail.com on 26 Oct 2009 at 11:58

GoogleCodeExporter commented 9 years ago
It looks like this affects only IE7 and IE8 works fine, do you confirm ?

Original comment by Julien.N...@gmail.com on 26 Oct 2009 at 3:30

GoogleCodeExporter commented 9 years ago
Not sure... I have only IE8 installed on my PC. And actually I don't want to 
upgrade
to IE8, because I need IE7 for work...

Original comment by andr....@gmail.com on 26 Oct 2009 at 4:17

GoogleCodeExporter commented 9 years ago
I'm not sure I understood what you meant ^^ Did you have the bug on IE7 or IE8 
? I
could not reproduce it on IE8.

Original comment by Julien.N...@gmail.com on 26 Oct 2009 at 9:30

GoogleCodeExporter commented 9 years ago
Sorry, I meant that I have IE7.

Original comment by andr....@gmail.com on 27 Oct 2009 at 7:51

GoogleCodeExporter commented 9 years ago

Original comment by Julien.N...@gmail.com on 30 Oct 2009 at 2:19

GoogleCodeExporter commented 9 years ago
Fix commited.
The examples have been updated too, please check wether this is fixed...

Original comment by Julien.N...@gmail.com on 7 Nov 2009 at 11:17

GoogleCodeExporter commented 9 years ago
Version 1.4.1 includes the fix.

Original comment by Julien.N...@gmail.com on 7 Nov 2009 at 3:33

GoogleCodeExporter commented 9 years ago
I've checked v1.4.1. Now solution works for IE7. Thanks Julien!

Original comment by andr....@gmail.com on 9 Nov 2009 at 10:05

GoogleCodeExporter commented 9 years ago
Take that IE ! :)

Original comment by Julien.N...@gmail.com on 9 Nov 2009 at 10:30

GoogleCodeExporter commented 9 years ago
I've just examined your fix for this issue with the setTimeout. You know, I 
think it
is not very elegant... I thought about another solution:
When the scale is changed flex application is also resized. When we catch resize
event in js, we can notify flex that scale is changed and recalculation 
reqired. I
mean just set some flag to true. And call invalidateDisplayList. And when
updateDisplayList will be actually called (with already valid width and height),
we'll check that the flag is set to true and recalculate scale.
So, it will be something like

                ExternalInterface.addCallback(_frameId + "_resize", function():void
                {
                    measureScale = true;
                    invalidateDisplayList();
                });

in the setupExternalInterface, and 

            if (_validForDisplay)
            {
                adjustPosition(measureScale);
                measureScale = false;
            }

in the updateDisplayList

Original comment by andr....@gmail.com on 9 Nov 2009 at 1:20

GoogleCodeExporter commented 9 years ago
Well, if you have a more elegant solution that works for IE7, IE8, Firefox 3, 
Safari
and Opera on Windows and Linux, that's great !
If so you can provide a patch file tested for all those browsers, or I can give 
you
committer access to the project.

Original comment by Julien.N...@gmail.com on 9 Nov 2009 at 1:43

GoogleCodeExporter commented 9 years ago
I've just checked it again and looks like it doesn't work without setTimeout... 
It
even works with setTimeout(..., 0), but without it is again fails...
Sorry for that... I've just worried that 10ms - is some kind of magic number 
and it
may be not enough in some cases...

Original comment by andr....@gmail.com on 9 Nov 2009 at 2:11

GoogleCodeExporter commented 9 years ago
The thing is to wait a while before recalculating, because IE7 sends bursts of
'resize' events. In some cases, 10 milliseconds might not be enough, causing the
scale to be recalculated several times, but what we want is just to avoid 
reaching an
incoherent state because we are flooded with resize events.

I agree, this is not pretty, but at least we are sure it will always work...

Original comment by Julien.N...@gmail.com on 9 Nov 2009 at 2:31