From 76e35cbbb9c6f3041af01a910da20d5e44ee7b0c Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Tue, 13 Jan 2009 14:14:03 -0800 Subject: [PATCH] Changing the way editor resizing works in Webkit (Chrome/Safari) so that it actually works properly. --- static/js/Editor.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/static/js/Editor.js b/static/js/Editor.js index 64f6bcd..c56d26e 100644 --- a/static/js/Editor.js +++ b/static/js/Editor.js @@ -479,13 +479,7 @@ Editor.prototype.resize = function ( height ) { height -= FRAME_BORDER_HEIGHT; // if no height is given, get the height from this editor's document body } else { - if ( WEBKIT ) { - var self = this; - withDocument( this.document, function () { - var body = getFirstElementByTagAndClassName( "body" ); - height = elementDimensions( body ).h; - } ); - } else if ( this.iframe.contentDocument ) { // Gecko and other sane browsers + if ( this.iframe.contentDocument && !WEBKIT ) { // Gecko and other sane browsers height = elementDimensions( this.document.documentElement ).h; } else { // IE height = this.document.body.scrollHeight;