-
-
Notifications
You must be signed in to change notification settings - Fork 983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue in IE 8 - height set to 0px #54
Comments
That's strange, the trigger is called twice as we can never quite be sure if the iFrame is fully loaded the first time it is called. It is more likely to work first time in dev, than in a production system, where your user could be on the end of a slow connection, so it would be good to better understand this problem. The code in the iFrame should just ignore the extra request. What version are you using? If you're not already on the latest version, could you try upgrading to v2.4.8 and see if the problem goes away and could you send me a link I could take a look at please. When the bit of code you edited is run I shall have to give this some more thought. |
For now I expect a better quick fix is to stop the iFrame ignoring the reset call. Look for this log message in the iFrame and get rid of the 'if' statement. 'Page reset ignored by init' |
I'm using latest compiled version v2.4.8. You can try out on http://pp.peterjurkovic.com/ Init script is placed in http://pp.peterjurkovic.sk/nlfnorm-widget.js Thanks for feedback. |
Just tried looking at this again, but the iFrame seems dead. |
The server, from which is iframe loaded, has been upgraded. It should work now. |
OK have a fix and will release it in the next couple of days, once I've finished a few other changes. function init(msg){
//We have to call trigger twice, as we can not be sure if all
//iframes have completed loading when this code runs. The
//event listener also catches the page changing in the iFrame.
addEventListener(iframe,'load',function(){
var fr = firstRun; // Reduce scope of var to function, because IE8's JS execution
// context stack is borked and this value gets externally
// changed midway through running this function. Dear MicroSoft
// the ECMAscript standard that you defined says that isn't allowed!
trigger('iFrame.onload',msg,iframe);
if (!fr && settings.heightCalculationMethod in resetRequiredMethods){
resetIFrame({
iframe:iframe,
height:0,
width:0,
type:'init'
});
}
});
trigger('init',msg,iframe);
} The next issue is that your CSS then spins the frame into a resize loop due to the CSS always setting the content to be bigger than the page, this makes the page resize and then the CSS expands to match it. I would try losing the top margin on the first list item and then the bottom margin on the last item to fix this. |
Thank you very much for your support. As soon as will the new version available, I'll upgrade and test it. I thank you for great sophisticated plugin, too ;) |
Just released v2.5.0 with this fix and a few new options. |
Hi! David, how are you? I have the same problem when I was about to use 2.4.8 version and when I updated to 2.5.2 this was fixed (thanks), but when I click in some link (page inside frame) and it loads the next page, this problem appears... did you have a light for me? Thank you very much |
this is how I'm turning around with jquery:
any better sugestion? |
Hi, I would probably prefer: $(window).load(function(){
$("body").height(XY);
}); In some cases document should not be fully loaded, I guess. |
Do you have a link I could look at when I'm back from holiday? Does the second page have slow loading images? You could set the interval option to -32. But there should be a better solution than that. |
Hi folks! thanks for the attention. ^_^ thanks Peter, I will try this workaround... maybe works. But, this "XY" is a variable? thanks David! I cannot show you the page because it's into an intranet, but I can try to explain any doubt that you have to help me find this solution. ^_^ Any doubts ou better ideas? Thank you two very much. ^_^ |
I try to integrate iframe-resize, but I came across the problem in Internet Explorer 8 browser.
I'm quite comfused, because in log is iFrame content height detected and set do value, but after that is "tirggred reset by host page" and height is set to zero. Isn't it bug?
Windows XP/ IE 8.0.6001
Thank you for feedback.
// EDIT
I found out the problem. It is caused because initialization is triggered twice and IE8 has obviously problem. I fixed it using inicialization timeout and IE detection.
The text was updated successfully, but these errors were encountered: