Ticket #2018: 2018_2.patch

File 2018_2.patch, 2.7 KB (added by Martin Kou, 16 years ago)
Line 
1Index: _whatsnew.html
2===================================================================
3--- _whatsnew.html      (revision 2052)
4+++ _whatsnew.html      (working copy)
5@@ -120,6 +120,10 @@
6                        when FCKeditor is installed to a different domain.</li>
7                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2066">#2066</a>] Added a workaround for a Mac
8                        Safari 3.1 browser bug which caused the Fit Window button to give a blank screen.</li>
9+               <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2018">#2018</a>] Reversed the fix for
10+                       <a target="_blank" href="http://dev.fckeditor.net/ticket/183">#183</a> which broke FCKeditorAPI's cleanup
11+                       logic. A new configuration directive <strong>MsWebBrowserControlOnUnloadKludge</strong> has been added
12+                       for those who wish to force the #183 fix to be enabled.</li>
13        </ul>
14        <h3>
15                Version 2.6</h3>
16Index: editor/_source/classes/fckiecleanup.js
17===================================================================
18--- editor/_source/classes/fckiecleanup.js      (revision 2050)
19+++ editor/_source/classes/fckiecleanup.js      (working copy)
20@@ -43,7 +43,7 @@
21 
22 function FCKIECleanup_Cleanup()
23 {
24-       if ( !this._FCKCleanupObj || !window.FCKUnloadFlag )
25+       if ( !this._FCKCleanupObj || ( FCKConfig.MsWebBrowserControlOnUnloadKludge && !window.FCKUnloadFlag ) )
26                return ;
27 
28        var aItems = this._FCKCleanupObj.Items ;
29Index: editor/_source/fckeditorapi.js
30===================================================================
31--- editor/_source/fckeditorapi.js      (revision 2050)
32+++ editor/_source/fckeditorapi.js      (working copy)
33@@ -164,13 +164,16 @@
34 
35 function FCKeditorAPI_Cleanup()
36 {
37-       if ( ! window.FCKUnloadFlag )
38+       if ( window.FCKConfig && FCKConfig.MsWebBrowserControlOnUnloadKludge
39+                       && !window.FCKUnloadFlag )
40                return ;
41        delete FCKeditorAPI.Instances[ FCK.Name ] ;
42 }
43 function FCKeditorAPI_ConfirmCleanup()
44 {
45-       window.FCKUnloadFlag = true ;
46+       if ( window.FCKConfig && FCKConfig.MsWebBrowserControlOnUnloadKludge )
47+               window.FCKUnloadFlag = true ;
48 }
49 FCKTools.AddEventListener( window, 'unload', FCKeditorAPI_Cleanup ) ;
50 FCKTools.AddEventListener( window, 'beforeunload', FCKeditorAPI_ConfirmCleanup) ;
51Index: fckconfig.js
52===================================================================
53--- fckconfig.js        (revision 2050)
54+++ fckconfig.js        (working copy)
55@@ -314,3 +314,8 @@
56 
57 FCKConfig.BackgroundBlockerColor = '#ffffff' ;
58 FCKConfig.BackgroundBlockerOpacity = 0.50 ;
59+
60+// Enable the follow option to prevent FCKeditor from unloading itself
61+// when viewed under a WebBrowser control inside an application.
62+// NOT RECOMMENDED for normal websites as it causes other problems.
63+FCKConfig.MsWebBrowserControlOnUnloadKludge = false ;
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy