Archived
1
0

Fix for IE6 error.

This commit is contained in:
Dan Helfman 2009-01-15 19:06:05 -08:00
parent 4a8e98372d
commit d212797f7d

View File

@ -280,6 +280,7 @@ Editor.prototype.position_cursor = function ( click_position ) {
var FRAME_BORDER_WIDTH = 2; var FRAME_BORDER_WIDTH = 2;
if ( this.iframe.contentWindow && this.iframe.contentWindow.getSelection ) { // browsers such as Firefox if ( this.iframe.contentWindow && this.iframe.contentWindow.getSelection ) { // browsers such as Firefox
// TODO
} else if ( this.document.selection ) { // browsers such as IE } else if ( this.document.selection ) { // browsers such as IE
var range = this.document.selection.createRange(); var range = this.document.selection.createRange();
range.moveToPoint( range.moveToPoint(
@ -535,7 +536,7 @@ Editor.prototype.resize = function ( height ) {
height -= FRAME_BORDER_HEIGHT * 2; // 2 pixels at the top and 2 at the bottom 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 // if no height is given, get the height from this editor's document body
} else { } else {
if ( this.iframe.contentDocument && !WEBKIT ) { // Gecko and other sane browsers if ( this.iframe && this.iframe.contentDocument && !WEBKIT ) { // Gecko and other sane browsers
height = elementDimensions( this.document.documentElement ).h; height = elementDimensions( this.document.documentElement ).h;
} else { // IE } else { // IE
height = this.document.body.scrollHeight; height = this.document.body.scrollHeight;