From 9d101ff1bebc291aae68a8b945218d6a9f15b4d6 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sun, 26 Jul 2009 10:31:03 -0700 Subject: [PATCH] Fixed a bug that caused ever-growing notes in Internet Explorer 8. --- NEWS | 3 +++ static/js/Editor.js | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 4c8fcda..607a7b4 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +1.6.17: July 26, 2009 + * Fixed a bug that caused ever-growing notes in Internet Explorer 8. + 1.6.16: July 14, 2009 * Fixed a bug that prevented the new note button from working in Internet Explorer. This fixes Luminotes support for Internet Explorer 8. diff --git a/static/js/Editor.js b/static/js/Editor.js index afb88aa..ea8b33e 100644 --- a/static/js/Editor.js +++ b/static/js/Editor.js @@ -427,7 +427,7 @@ Editor.prototype.position_cursor = function ( div_range ) { selection.addRange( range ); return; } - } else if ( div_range && this.document.selection ) { // browsers such as IE + } else if ( div_range && this.document && this.document.selection ) { // browsers such as IE function text_length( text ) { var count = 0; for ( var i = 0; i < text.length; i++ ) { @@ -470,7 +470,7 @@ Editor.prototype.position_cursor = function ( div_range ) { range.selectNodeContents( last_node ); range.collapse( false ); selection.addRange( range ); - } else if ( this.document.selection ) { // browsers such as IE + } else if ( this.document && this.document.selection ) { // browsers such as IE var range = this.document.selection.createRange(); range.move( "textedit" ); range.select(); @@ -671,7 +671,7 @@ Editor.prototype.resize = function ( get_height_from_div ) { 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 } else { - if ( this.iframe && this.iframe.contentDocument && !WEBKIT ) { // Gecko and other sane browsers + if ( this.iframe && this.iframe.contentDocument && GECKO ) { // Gecko and other sane browsers height = elementDimensions( this.document.documentElement ).h; } else { // IE height = this.document.body.scrollHeight;