I've been a serendipity user for a while and the preview entry feature has never worked correctly for me. The iframe with the my post preview shows up for a fraction of a second, but as soon as the page finishes loading, it dissapears.
I've just installed seredipity 1.0 (yea!) and I noticed this was still a problem so I thought I should finally do something about it. I believe I've located the source of the problem, and I don't think this is serendipity's fault, but I thought I would share my findings in case anyone else had this issue.
The height of the preview iframe is set here: serendipity/templates/default/preview_iframe.tpl
I found that the following code was setting the iframe height to 10px:
Code: Select all
parent.document.getElementById('serendipity_iframe').style.height = document.getElementById('mainpane').offsetHeight
+ parseInt(document.getElementById('mainpane').style.marginTop)
+ parseInt(document.getElementById('mainpane').style.marginBottom)
+ 'px';
Code: Select all
parent.document.getElementById('serendipity_iframe').scrolling = 'yes';