witten
/
luminotes
Archived
1
0
Fork 0

Fixing vertical height of new (empty) frames.

This commit is contained in:
Dan Helfman 2009-01-22 13:16:25 -08:00
parent 46d28d0ea0
commit 56c7f8ea11
1 changed files with 2 additions and 1 deletions

View File

@ -565,11 +565,12 @@ Editor.prototype.resize = function ( get_height_from_div ) {
var height = null;
var width = elementDimensions( this.div.parentNode ).w;
// set the width first, because that influence the height of the content
var size = { "w": width };
setElementDimensions( this.iframe, size );
setElementDimensions( this.div, size );
if ( get_height_from_div ) {
if ( get_height_from_div && !this.empty() ) {
height = elementDimensions( this.div ).h;
height -= FRAME_BORDER_HEIGHT * 2; // 2 pixels at the top and 2 at the bottom
// if no height is given, get the height from this editor's document body