Index: _whatsnew.html
===================================================================
--- _whatsnew.html (revision 2052)
+++ _whatsnew.html (working copy)
@@ -120,6 +120,10 @@
when FCKeditor is installed to a different domain.
[#2066] Added a workaround for a Mac
Safari 3.1 browser bug which caused the Fit Window button to give a blank screen.
+ [#2018] Reversed the fix for
+ #183 which broke FCKeditorAPI's cleanup
+ logic. A new configuration directive MsWebBrowserControlOnUnloadKludge has been added
+ for those who wish to force the #183 fix to be enabled.
Version 2.6
Index: editor/_source/classes/fckiecleanup.js
===================================================================
--- editor/_source/classes/fckiecleanup.js (revision 2050)
+++ editor/_source/classes/fckiecleanup.js (working copy)
@@ -43,7 +43,7 @@
function FCKIECleanup_Cleanup()
{
- if ( !this._FCKCleanupObj || !window.FCKUnloadFlag )
+ if ( !this._FCKCleanupObj || ( FCKConfig.MsWebBrowserControlOnUnloadKludge && !window.FCKUnloadFlag ) )
return ;
var aItems = this._FCKCleanupObj.Items ;
Index: editor/_source/fckeditorapi.js
===================================================================
--- editor/_source/fckeditorapi.js (revision 2050)
+++ editor/_source/fckeditorapi.js (working copy)
@@ -164,13 +164,16 @@
function FCKeditorAPI_Cleanup()
{
- if ( ! window.FCKUnloadFlag )
+ if ( window.FCKConfig && FCKConfig.MsWebBrowserControlOnUnloadKludge
+ && !window.FCKUnloadFlag )
return ;
delete FCKeditorAPI.Instances[ FCK.Name ] ;
}
function FCKeditorAPI_ConfirmCleanup()
{
- window.FCKUnloadFlag = true ;
+ if ( window.FCKConfig && FCKConfig.MsWebBrowserControlOnUnloadKludge )
+ window.FCKUnloadFlag = true ;
}
FCKTools.AddEventListener( window, 'unload', FCKeditorAPI_Cleanup ) ;
FCKTools.AddEventListener( window, 'beforeunload', FCKeditorAPI_ConfirmCleanup) ;
Index: fckconfig.js
===================================================================
--- fckconfig.js (revision 2050)
+++ fckconfig.js (working copy)
@@ -314,3 +314,8 @@
FCKConfig.BackgroundBlockerColor = '#ffffff' ;
FCKConfig.BackgroundBlockerOpacity = 0.50 ;
+
+// Enable the follow option to prevent FCKeditor from unloading itself
+// when viewed under a WebBrowser control inside an application.
+// NOT RECOMMENDED for normal websites as it causes other problems.
+FCKConfig.MsWebBrowserControlOnUnloadKludge = false ;