﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
8432	IE8 openDialog('image') error	bdahl		"Hi I found a bug in the IE8 ckeditor when I called the following code:

var oEditor = CKEDITOR.instances['blog.message'];
oEditor.openDialog('image');

only in IE I get this error:

When I add an image to my post 
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; BTRS28621; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2; .NET4.0C) 
Timestamp: Wed, 28 Sep 2011 15:22:28 UTC 
Message: 'preview' is null or not an object 
Line: 8 
Char: 1773 
Code: 0 
URI: http://.com/static/5.6.14/js/lib/ckedit ... ?t=ABLC4TW 
Message: Access is denied. 
Line: 120 
Char: 2363 
Code: 0 
URI: http://.com/static/5.6.14/js/lib/ckeditor/ckeditor.js 

I found a small change that fixes it:


Index: static-server/js/lib/ckeditor/_source/plugins/image/dialogs/image.js
===================================================================
--- static-server/js/lib/ckeditor/_source/plugins/image/dialogs/image.js	(revision 22060)
+++ static-server/js/lib/ckeditor/_source/plugins/image/dialogs/image.js	(working copy)
@@ -281,7 +281,7 @@

var editor = this.getParentEditor(),
sel = this.getParentEditor().getSelection(),
-	 element = sel.getSelectedElement(),
+	 element = sel && sel.getSelectedElement(),
link = element && element.getAscendant( 'a' );

//Hide loader.
"	Bug	closed	Normal	CKEditor 3.6.3	UI : Dialogs	3.6.2	fixed		bdahl@…
