Index: _whatsnew.html
===================================================================
--- _whatsnew.html (revision 2211)
+++ _whatsnew.html (working copy)
@@ -82,6 +82,8 @@
in the Paste dialog.
[#1907] Fixed sporadic
"FCKeditorAPI is not defined" errors in Firefox 3.
+ [#234] Fixed
+ the incompatibility with the Microsoft ASP.Net AJAX UpdatePanel.
See previous versions history
Index: editor/_source/fckeditorapi.js
===================================================================
--- editor/_source/fckeditorapi.js (revision 2211)
+++ editor/_source/fckeditorapi.js (working copy)
@@ -147,6 +147,43 @@
if ( oForm )
{
+ // Fix for the ASP.Net AJAX UpdatePanel. (#234)
+ var win = FCKTools.GetElementWindow( oForm ) ;
+ if ( win && win.Sys && win.Sys.WebForms && win.Sys.WebForms.PageRequestManager )
+ {
+ var _onSubmitStatements;
+ try
+ {
+ _onSubmitStatements = win.Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements ;
+ }
+ catch (e) {}
+
+ if ( _onSubmitStatements )
+ {
+ var updateFn = function()
+ {
+ FCK.UpdateLinkedField();
+ return true;
+ } ;
+ // Mark the function with the editor name.
+ updateFn._fckname = FCK.Name;
+
+ // The _onSubmitStatements may still have a referene for the
+ // previous function used to update the field. So, let's scan and
+ // remove it.
+ for ( var i = 0 ; i < _onSubmitStatements.length ; i++ )
+ {
+ var _fckname = _onSubmitStatements[i]._fckname;
+ if ( _fckname && _fckname == FCK.Name )
+ _onSubmitStatements.splice( i, 1 );
+ }
+
+ _onSubmitStatements.push( updateFn );
+
+ return;
+ }
+ }
+
// Attach to the onsubmit event.
FCKTools.AddEventListener( oForm, 'submit', FCK.UpdateLinkedField ) ;