witten
/
luminotes
Archived
1
0
Fork 0

Adding fix for stupid IE 6 HTTPS warning message.

This commit is contained in:
Dan Helfman 2009-01-19 22:47:43 -08:00
parent 4ceddacbc8
commit 2e3501f5fc
2 changed files with 4 additions and 5 deletions

0
static/html/blank.html Normal file
View File

View File

@ -142,7 +142,7 @@ Editor.prototype.create_iframe = function ( position_after, click_position ) {
this.iframe = createDOM( "iframe",
{
// iframe src attribute is necessary in IE 6 on an HTTPS site to prevent annoying warnings
"src": "about:blank",
"src": MSIE6 && "/static/html/blank.html" || "about:blank",
"frameBorder": "0",
"scrolling": "no",
"id": iframe_id,
@ -278,15 +278,14 @@ Editor.prototype.position_cursor = function ( click_position ) {
// if requested, move the text cursor to a specific location
if ( click_position ) {
var FRAME_BORDER_WIDTH = 2;
click_position.x -= this.iframe.offsetLeft + FRAME_BORDER_WIDTH;
click_position.y -= this.iframe.offsetTop + FRAME_BORDER_WIDTH;
if ( this.iframe.contentWindow && this.iframe.contentWindow.getSelection ) { // browsers such as Firefox
// TODO
} else if ( this.document.selection ) { // browsers such as IE
var range = this.document.selection.createRange();
range.moveToPoint(
click_position.x - this.iframe.offsetLeft - FRAME_BORDER_WIDTH,
click_position.y - this.iframe.offsetTop - FRAME_BORDER_WIDTH
);
range.moveToPoint( click_position.x, click_position.y );
range.select();
}