Index: /FCKeditor/branches/features/floating_dialog/editor/fckdialog.html
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/fckdialog.html	(revision 1319)
+++ /FCKeditor/branches/features/floating_dialog/editor/fckdialog.html	(revision 1320)
@@ -277,5 +277,6 @@
 {
 	var registeredWindows = [] ;
-	var lastCoords = null ;
+	var lastCoords ;
+	var currentPos ;
 	
 	var cleanUpHandlers = function()
@@ -296,14 +297,21 @@
 			evt = FCKTools.GetElementDocument( this ).parentWindow.event ;
 
-		var currentCoords = {'x' : evt.screenX, 'y' : evt.screenY};
-		var dx = currentCoords.x - lastCoords.x;
-		var dy = currentCoords.y - lastCoords.y;
-		lastCoords = currentCoords;
-
-		var x = parseInt( FCKDomTools.GetCurrentElementStyle( Args().TopWindow, frameElement, 'left' ) ) + dx ;
-		var y = parseInt( FCKDomTools.GetCurrentElementStyle( Args().TopWindow, frameElement, 'top' ) ) + dy ;
-
-		frameElement.style.left	= x + 'px' ;
-		frameElement.style.top	= y + 'px' ;
+		// Updated the last coordinates.
+		var currentCords =
+		{
+			x : evt.screenX,
+			y : evt.screenY
+		} ;
+
+		currentPos =
+		{
+			x : currentPos.x + ( currentCords.x - lastCoords.x ),
+			y : currentPos.y + ( currentCords.y - lastCoords.y )
+		} ;
+
+		lastCoords = currentCords ;
+
+		frameElement.style.left	= currentPos.x + 'px' ;
+		frameElement.style.top	= currentPos.y + 'px' ;
 
 		if ( evt.preventDefault )
@@ -340,5 +348,16 @@
 				return ;
 
-			lastCoords = {'x' : evt.screenX, 'y' : evt.screenY} ;
+			lastCoords = 
+			{
+				x : evt.screenX, 
+				y : evt.screenY
+			} ;
+
+			// Save the current IFRAME position.
+			currentPos = 
+			{
+				x : parseInt( FCKDomTools.GetCurrentElementStyle( Args().TopWindow, frameElement, 'left' ) ),
+				y : parseInt( FCKDomTools.GetCurrentElementStyle( Args().TopWindow, frameElement, 'top' ) )
+			} ;
 
 			for ( var i = 0 ; i < registeredWindows.length ; i++ )
