Index: /FCKeditor/branches/features/floating_dialog/_samples/html/sample01.html
===================================================================
--- /FCKeditor/branches/features/floating_dialog/_samples/html/sample01.html	(revision 1261)
+++ /FCKeditor/branches/features/floating_dialog/_samples/html/sample01.html	(revision 1262)
@@ -44,4 +44,5 @@
 // This is usefull only for these samples. A real application should use something like this:
 // oFCKeditor.BasePath = '/fckeditor/' ;	// '/fckeditor/' is the default value.
+document.domain = 'fckeditor.mac' ;
 var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
 
Index: /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fcktools.js
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fcktools.js	(revision 1261)
+++ /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fcktools.js	(revision 1262)
@@ -628,4 +628,11 @@
 FCKTools.GetVoidUrl = function()
 {
+	if ( FCK_IS_CUSTOM_DOMAIN )
+		return "javascript: void( function(){" +
+			"document.open();" +
+			"document.write('<html><head><title></title></head><body></body></html>');" + 
+			"document.domain = '" + FCK_RUNTIME_DOMAIN + "';" +
+			"document.close();" +
+			"}() ) ;";
 	if ( FCKBrowserInfo.IsIE )
 	{
Index: /FCKeditor/branches/features/floating_dialog/editor/fckdebug.html
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/fckdebug.html	(revision 1261)
+++ /FCKeditor/branches/features/floating_dialog/editor/fckdebug.html	(revision 1262)
@@ -70,5 +70,4 @@
 	if ( bDomainChanged )
 	{
-		oFrame.src = sUrl ;
 		var sUrl = 'javascript: void( function(){' +
 			'document.open() ;' +
@@ -77,6 +76,10 @@
 			'document.close() ;' +
 			'}() ) ;';
-		oWindow = oFrame.contentWindow ;
-		oDiv	= oWindow.document.getElementById('divMsg') ;
+		oFrame.src = sUrl ;
+		setTimeout( function()
+		{
+			oWindow = oFrame.contentWindow ;
+			oDiv	= oWindow.document.getElementById('divMsg') ;
+		}, 1 ) ;
 	}
 	else
Index: /FCKeditor/branches/features/floating_dialog/editor/fckdialog.html
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/fckdialog.html	(revision 1261)
+++ /FCKeditor/branches/features/floating_dialog/editor/fckdialog.html	(revision 1262)
@@ -48,4 +48,32 @@
 }
 
+// Domain relaxation logic.
+(function RelaxDomain()
+{
+	var d = document.domain ;
+
+	while ( true )
+	{
+		// Test if we can access a parent property.
+		try
+		{
+			var parentDomain = Args().TopWindow ? Args().TopWindow.document.domain : Editor().document.domain ;
+
+			if ( document.domain != parentDomain )
+				document.domain = parentDomain ;
+			break ;
+		}
+		catch( e ) {}
+
+		// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
+		d = d.replace( /.*?(?:\.|$)/, '' ) ;
+
+		if ( d.length == 0 )
+			break ;		// It was not able to detect the domain.
+
+		document.domain = d ;
+	}
+})() ;
+
 var FCK			= Editor().FCK ;
 var FCKTools		= Editor().FCKTools ;
@@ -54,32 +82,4 @@
 var FCKBrowserInfo	= Editor().FCKBrowserInfo ;
 var FCKConfig		= Editor().FCKConfig ;
-
-// Domain relaxation logic.
-(function RelaxDomain()
-{
-	var d = document.domain ;
-
-	while ( true )
-	{
-		// Test if we can access a parent property.
-		try
-		{
-			var parentDomain = Args().TopWindow ? Args().TopWindow.document.domain : Editor().document.domain ;
-
-			if ( document.domain != parentDomain )
-				document.domain = parentDomain ;
-			break ;
-		}
-		catch( e ) {}
-
-		// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
-		d = d.replace( /.*?(?:\.|$)/, '' ) ;
-
-		if ( d.length == 0 )
-			break ;		// It was not able to detect the domain.
-
-		document.domain = d ;
-	}
-})() ;
 
 // Steal the focus so that the caret would no longer stay in the editor iframe.
