Changeset 546

Show
Ignore:
Timestamp:
2007-07-26 01:17:00 (16 months ago)
Author:
martinkou
Message:

Fixed #183 : Changing the visible property of a WebBrowser control running FCKeditor would incorrectly trigger FCKeditor's cleanup logic.

Location:
FCKeditor/trunk/editor/_source
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/classes/fckiecleanup.js

    r132 r546  
    4444function FCKIECleanup_Cleanup() 
    4545{ 
    46         if ( !this._FCKCleanupObj ) 
     46        if ( !this._FCKCleanupObj || !window.FCKUnloadFlag ) 
    4747                return ; 
    4848 
  • FCKeditor/trunk/editor/_source/fckeditorapi.js

    r173 r546  
    157157function FCKeditorAPI_Cleanup() 
    158158{ 
     159        if ( ! window.FCKUnloadFlag ) 
     160                return ; 
    159161        delete FCKeditorAPI.__Instances[ FCK.Name ] ; 
    160162} 
     163function FCKeditorAPI_ConfirmCleanup() 
     164{ 
     165        window.FCKUnloadFlag = true ; 
     166} 
    161167FCKTools.AddEventListener( window, 'unload', FCKeditorAPI_Cleanup ) ;    
     168FCKTools.AddEventListener( window, 'beforeunload', FCKeditorAPI_ConfirmCleanup) ;