Index: /FCKeditor/branches/features/floating_dialog/editor/_source/classes/fcktoolbarbuttonui.js
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/_source/classes/fcktoolbarbuttonui.js	(revision 1073)
+++ /FCKeditor/branches/features/floating_dialog/editor/_source/classes/fcktoolbarbuttonui.js	(revision 1074)
@@ -156,4 +156,5 @@
 	else if ( button.State == FCK_TRISTATE_ON )
 		this.className = 'TB_Button_On_Over' ;
+	FCK.ToolbarSet.CurrentInstance.LastActiveButton = button ;
 }
 
@@ -164,4 +165,5 @@
 	else if ( button.State == FCK_TRISTATE_ON )
 		this.className = 'TB_Button_On' ;
+	FCK.ToolbarSet.CurrentInstance.LastActiveButton = button ;
 }
 
Index: /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fck.js
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fck.js	(revision 1073)
+++ /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fck.js	(revision 1074)
@@ -33,4 +33,5 @@
 	DataProcessor		: new FCKDataProcessor(),
 	Window			: window,
+	LastActiveButton	: null,
 
 	AttachToOnSelectionChange : function( functionPointer )
@@ -752,6 +753,4 @@
 			FCKDomTools.SetElementStyles( this.BackgroundBlocker,
 				{
-					'left' : '0px',
-					'top' : '0px',
 					'position' : 'absolute',
 					'zIndex' : 0
@@ -771,28 +770,15 @@
 			var frameWidth = editorFrame.offsetWidth ;
 			var frameHeight = editorFrame.offsetHeight ;
-			if ( this.Commands.GetCommand( 'FitWindow' ).GetState() != FCK_TRISTATE_ON )
-			{
-				FCKDomTools.SetElementStyles( editorFrame,
-						{
-						'zIndex' : 100,
-						'width' : frameWidth + 'px',
-						'height' : frameHeight + 'px',
-						'position' : 'absolute'
-						} ) ;
-				FCKDomTools.SetElementStyles( editorParentElement, 
-						{
-						'width' : frameWidth + 'px',
-						'height' : frameHeight + 'px',
-						'position' : 'relative'
-						} ) ;
-			}
-
-			var parentDivPosition = FCKTools.GetDocumentPosition( this.Window.parent, editorParentElement ) ;
+			var positionedAncestor = FCKDomTools.GetPositionedAncestor( this.Window.parent, editorParentElement ) ;
+			var positionedAncestorCoords = positionedAncestor ? FCKTools.GetDocumentPosition( this.Window.parent, positionedAncestor ) :
+				{ 'x':0, 'y':0 } ;
+			var editorFrameCoords = FCKTools.GetDocumentPosition( this.Window.parent, editorFrame ) ;
+
 			FCKDomTools.SetElementStyles( this.EditorBlocker,
 				{
 					'width' : editorFrame.offsetWidth + 'px',
 					'height' : editorFrame.offsetHeight + 'px',
-					'left' : '0px',
-					'top' : '0px',
+					'left' : ( editorFrameCoords.x - positionedAncestorCoords.x ) + 'px',
+					'top' : ( editorFrameCoords.y - positionedAncestorCoords.y ) + 'px',
 					'display' : ''
 				} ) ;
@@ -811,6 +797,6 @@
 						doc.documentElement.clientHeight,
 						doc.body.scrollHeight ) -1 + 'px',
-					'left' : ( -1 * parentDivPosition.x ) + 'px',
-					'top' : ( -1 * parentDivPosition.y ) + 'px',
+					'left' : ( -1 * positionedAncestorCoords.x ) + 'px',
+					'top' : ( -1 * positionedAncestorCoords.y ) + 'px',
 					'display' : ''
 				} ) ;
@@ -825,6 +811,9 @@
 				}
 			}
-			editorParentElement.appendChild( this.BackgroundBlocker ) ;
+			editorParentElement.insertBefore( this.BackgroundBlocker, editorFrame ) ;
 			editorParentElement.appendChild( this.EditorBlocker ) ;
+
+			if ( this.LastActiveButton )
+				FCKToolbarButtonUI_OnMouseOut.apply( this.LastActiveButton.MainElement, [null, this.LastActiveButton] ) ;
 
 			FCKFocusManager.Lock() ;
Index: /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fcktools.js
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fcktools.js	(revision 1073)
+++ /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fcktools.js	(revision 1074)
@@ -430,4 +430,6 @@
 		curNode = curNode.offsetParent ;
 	}
+	x += w.document.body.offsetLeft ;
+	y += w.document.body.offsetTop ;
 	return { "x" : x, "y" : y } ;
 }
