Index: /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fckdialog.js
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fckdialog.js	(revision 1229)
+++ /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fckdialog.js	(revision 1230)
@@ -108,34 +108,64 @@
 			}
 
-			// Calculate the dialog position, centering it on the screen.
-			var viewSize = FCKTools.GetViewPaneSize( topWindow ) ;
-			var scrollPosition = FCKTools.GetScrollPosition( topWindow ) ;
-			var iTop  = Math.max( scrollPosition.Y + ( viewSize.Height - height - 20 ) / 2, 0 ) ;
-			var iLeft = Math.max( scrollPosition.X + ( viewSize.Width - width - 20 )  / 2, 0 ) ;
-
-			// Setup the IFRAME that will hold the dialog.
-			var dialog = topDocument.createElement( 'iframe' ) ;
-			dialog.src = FCKConfig.BasePath + 'fckdialog.html' ;
-			dialog.frameBorder = 0 ;
-			dialog.allowTransparency = true ;
-			FCKDomTools.SetElementStyles( dialog,
-					{
-						'position'	: 'absolute',
-						'top'		: iTop + 'px',
-						'left'		: iLeft + 'px',
-						'width'		: width + 'px',
-						'height'	: height + 'px',
-						'zIndex'	: getZIndex()
-					} ) ;
-
-			// Save the dialog info to be used by the dialog page once loaded.
-			dialog._DialogArguments = dialogInfo ;
-
-			// Append the IFRAME to the target document.
-			topDocument.body.appendChild( dialog ) ;
-
-			// Keep record of the dialog's parent/child relationships.
-			dialog._ParentDialog = topDialog ;
-			topDialog = dialog ;
+			// Steal the focus from the editor.
+			var knapsack = topDocument.createElement( 'textarea' ) ;
+			knapsack.value = knapsack.name = '_FCK_Dummy' ;
+			FCKDomTools.SetElementStyles( knapsack,
+				{
+					'position' : 'absolute',
+					'top' : '-1000px',
+					'left' : '-1000px',
+					'zIndex' : 100000
+				} ) ;
+			topDocument.body.appendChild( knapsack ) ;
+
+			var createDialog = function()
+			{
+				// Destroy the text area used for stealing focus.
+				knapsack.parentNode.removeChild( knapsack ) ;
+
+				// Calculate the dialog position, centering it on the screen.
+				var viewSize = FCKTools.GetViewPaneSize( topWindow ) ;
+				var scrollPosition = FCKTools.GetScrollPosition( topWindow ) ;
+				var iTop  = Math.max( scrollPosition.Y + ( viewSize.Height - height - 20 ) / 2, 0 ) ;
+				var iLeft = Math.max( scrollPosition.X + ( viewSize.Width - width - 20 )  / 2, 0 ) ;
+
+				// Setup the IFRAME that will hold the dialog.
+				var dialog = topDocument.createElement( 'iframe' ) ;
+				dialog.src = FCKConfig.BasePath + 'fckdialog.html' ;
+				dialog.frameBorder = 0 ;
+				dialog.allowTransparency = true ;
+				FCKDomTools.SetElementStyles( dialog,
+						{
+							'position'	: 'absolute',
+							'top'		: iTop + 'px',
+							'left'		: iLeft + 'px',
+							'width'		: width + 'px',
+							'height'	: height + 'px',
+							'zIndex'	: getZIndex()
+						} ) ;
+
+				// Save the dialog info to be used by the dialog page once loaded.
+				dialog._DialogArguments = dialogInfo ;
+
+				// Append the IFRAME to the target document.
+				topDocument.body.appendChild( dialog ) ;
+
+				// Keep record of the dialog's parent/child relationships.
+				dialog._ParentDialog = topDialog ;
+				topDialog = dialog ;
+			}
+			
+			var stealFocus = function()
+			{
+				knapsack.focus() ;
+				if ( knapsack.setSelectionRange )
+					knapsack.setSelectionRange( 0, 0 ) ;
+				else
+					knapsack.createTextRange().select() ;
+				setTimeout( createDialog, 1 ) ;
+			}
+
+			setTimeout( stealFocus, 1 ) ;
 		},
 
Index: /FCKeditor/branches/features/floating_dialog/editor/dialog/fck_table.html
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/dialog/fck_table.html	(revision 1229)
+++ /FCKeditor/branches/features/floating_dialog/editor/dialog/fck_table.html	(revision 1230)
Index: /FCKeditor/branches/features/floating_dialog/editor/fckdialog.html
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/fckdialog.html	(revision 1229)
+++ /FCKeditor/branches/features/floating_dialog/editor/fckdialog.html	(revision 1230)
@@ -535,6 +535,6 @@
 			return ;
 
-		// Debouncing logic for Opera, for preventing the dialog from vibrating during mouse drags.
-		if ( FCKBrowserInfo.IsOpera )
+		// Debouncing logic for Opera and IE7, for preventing the dialog from vibrating during mouse drags.
+		if ( FCKBrowserInfo.IsOpera || FCKBrowserInfo.IsIE7 )
 		{
 			if ( window.LastMoveTimestamp > (new Date()).getTime() - 20 )
@@ -640,4 +640,37 @@
 
 /**
+  * Steals selection from the editor window after running EnsureSelection().
+  */
+function StealSelection()
+{
+	var dummy = document.createElement( 'textarea' ) ;
+	dummy.value = dummy.name = 'dummy' ;
+	FCKDomTools.SetElementStyles( dummy,
+		{
+			'position' : 'absolute',
+			'left' : '-10000px',
+			'top' : '-10000px',
+			'zIndex' : 10000
+		} ) ;
+	document.body.appendChild( dummy ) ;
+
+	var removeDummy = function()
+	{
+		dummy.parentNode.removeChild( dummy ) ;
+	}
+
+	var stealFocus = function()
+	{
+		dummy.focus() ;
+		if ( dummy.setSelectionRange )
+			dummy.setSelectionRange( 0, 0 ) ;
+		else
+			dummy.createTextRange().select() ;
+		setTimeout( removeDummy, 1 ) ;
+	}
+	setTimeout( stealFocus, 1 ) ;
+}
+
+/**
  * Get the FCKSelection object for the editor instance.
  */
@@ -645,5 +678,7 @@
 {
 	EnsureSelection() ;
-	return FCK.Selection ;
+	var retval = FCK.Selection ;
+	StealSelection() ;
+	return retval ;
 }
 
Index: /FCKeditor/branches/features/floating_dialog/editor/plugins/placeholder/fck_placeholder.html
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/plugins/placeholder/fck_placeholder.html	(revision 1229)
+++ /FCKeditor/branches/features/floating_dialog/editor/plugins/placeholder/fck_placeholder.html	(revision 1230)
@@ -29,4 +29,5 @@
 		<script language="javascript">
 
+var dialog = window.parent ;
 var oEditor = window.parent.InnerDialogLoaded() ;
 var FCKLang = oEditor.FCKLang ;
@@ -44,5 +45,5 @@
 }
 
-var eSelected = oEditor.FCKSelection.GetSelectedElement() ;
+var eSelected = dialog.GetSelection().GetSelectedElement() ;
 
 function LoadSelected()
