| Issue 246: | Double page loading in an Iframe using firefox (fix) | |
| 6 people starred this issue and may be notified of changes. | Back to list |
As widely experienced already; Firefox (and maybe other browsers) load the
url for a iframe nyromodal twice.
This effect occurs because of the following.
The iframe gets inserted in a temp container with the url set.
Even tough the iframe is in a hidden div the url gets loaded.
The iframe then gets moved to the normal content container.
Now Firefox and some other browsers dont like to move around iframes in the
DOM.
When you do this the iframe will be recreated and the inner page gets
loaded again.
The following fixes this problem in nyromodal 1.5.0 :
line 449 replace src="'+url+'" with src="javascript:false;"
Add the following below line 932
if(currentSettings.type == 'iframe') {
debug('Iframe Load: '+currentSettings.url);
modal.content.find('iframe').attr('src', currentSettings.url);
}
Now the iframe will just load the url when it is in its final DOM position.
You can also download the attached file wich includes the above fixes.
May 14, 2009
Thanks for the fix. It will be applied in the next release
Status:
Accepted
May 14, 2009
Issue 193 has been merged into this issue.
May 14, 2009
Issue 174 has been merged into this issue.
May 14, 2009
While testing out this fix we banged our head to another issue.
Because we load the iframe at the fillContent() function it could be that the iframe
was done loading before all the nyroModal logic finished.
This caused a quicktime movie wich we are showing on the iframed page to stop loading.
Instead of inserting
if(currentSettings.type == 'iframe') {
debug('Iframe Load: '+currentSettings.url);
modal.content.find('iframe').attr('src', currentSettings.url);
}
at line 932 it works much better adding this in the endShowContent function instead
Above
if (currentSettings.autoSizable && currentSettings.type == 'iframe') {
So changing the result to the following attached file
May 14, 2009
that's right, and the first code would also probably create some bug in IE.
Jul 16, 2009
Gargl ! I found this topic too late... What a big bug ! Please pack a "good" version asap :-)
Jul 17, 2009
the version 1.5.1 just released should fix this issue.
Status:
Fixed
Labels: Type-Defect
Jul 19, 2009
Thank's for this new release, I could test it next monday ;-) But... testing "anotherhero" version (view comment) last week, when I refresh the iframe it reduce the modal width each time : so after refresh the iframe content more than 10 times (right click => refresh the iframe) the width of the modal is very reduced... I will see if the bug appears with the 1.5.1 version.
Jul 20, 2009
I confirm the bug which reduce the iframe when refreshing doesn't appears in the 1.5.1 version. But on the first loading of my iframe with the 1.5.1 version I have a "false" content which appears in the iframe, just before loading the iframe content. This "false" content is displayed just 1 second, but it's not very beautiful. Can we hide it ?
Jul 29, 2009
i suggest,it should be like this: src="#" but not src="javascript:false;" because when loading the frame,it will be shown "false" in browser. after it has loaded,the "false" was disappear
Jul 30, 2009
src="#" works fine with Firefox 3.5, IE6 and IE7. But with Google Chrome we can see the current page a few instant (in place of the "false" word).
Jul 31, 2009
the javascript:false was implemented in order to avoid trouble with https content. Could somebody try with the src=# in IE loaded from an https page if there is a security warning ?
Aug 13, 2009
The src=# works fine from https in IE7/IE8, however IE6 will throw a warning prompt every time indicating that the user is about to navigate from secure content to non-secured content. We've run into this issue before and have resolved it by creating an http handler which writes <html></html> tags to the response stream, which we set as the iframe src value. I hope this helps in fixing for the next version.
Aug 13, 2009
Actually, I found an other solution: using javascript:''; solves the problem, and will be implemented in the next release. |
I forgot to delete debug('Iframe Load: '+currentSettings.url); on line 450