Index: _whatsnew.html
===================================================================
--- _whatsnew.html	(revision 1708)
+++ _whatsnew.html	(working copy)
@@ -73,6 +73,8 @@
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1055">#1055</a>] Added logic
 			to override JavaScript errors occuring inside the editing frame due to user added
 			JavaScript code.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2024">#2024</a>] Fixed
+			JavaScript error in IE when the user tries to open dialogs in Source mode.</li>
 	</ul>
 	<h3>
 		Version 2.6 Beta 1</h3>
Index: editor/_source/internals/fckdialog.js
===================================================================
--- editor/_source/internals/fckdialog.js	(revision 1707)
+++ editor/_source/internals/fckdialog.js	(working copy)
@@ -107,7 +107,9 @@
 				// Ensures the editor has the selection focus. (#1801)
 				currentInstance.Focus() ;
 
-				var editorDocument = currentInstance.EditorDocument ;
+				var editorDocument = ( currentInstance.EditMode == FCK_EDITMODE_WYSIWYG ?
+						currentInstance.EditorDocument :
+						FCKTools.GetElementDocument( currentInstance.EditingArea.Textarea ) ) ;
 				var selection = editorDocument.selection ;
 				var range ;
 
