Ticket #8712: 8712.patch

File 8712.patch, 1.4 KB (added by kaga, 10 years ago)
  • CKEditorControl.cs

     
    10301030                        string scriptInit = string.Empty;
    10311031                        string doPostBackScript = string.Empty;
    10321032                        if (this.AutoPostBack) doPostBackScript = string.Format(@"CKEDITOR.instances['{0}'].on('blur', function() {{if(this.checkDirty()){{javascript:setTimeout('__doPostBack(\'{0}\',\'\')',0); }}}});", this.ClientID);
    1033                        
     1033                        if (this.Page.MaintainScrollPositionOnPostBack) doPostBackScript += "ckeditor.on('instanceReady',WebForm_RestoreScrollPosition);";
    10341034                        // Sys.Application.add_load does not work on browsers != IE
    10351035                        // http://msdn.microsoft.com/en-us/library/bb386417.aspx
    10361036                        // Check _dev/msajax.js for an uncompressed version (available in CKEditor.Net downloaded from SVN).
     
    10561056", this.ClientID, prepareJSON(), proSour, doPostBackScript);
    10571057                        }
    10581058                        else
    1059                                 script += string.Format(@"CKEditor_Init.push(function(){{if(typeof CKEDITOR.instances['{0}']!='undefined' || !document.getElementById('{0}')) return;CKEDITOR.replace('{0}',{1}); {2}}});
     1059                                script += string.Format(@"CKEditor_Init.push(function(){{if(typeof CKEDITOR.instances['{0}']!='undefined' || !document.getElementById('{0}')) return;var ckeditor = CKEDITOR.replace('{0}',{1}); {2}}});
    10601060", this.ClientID, prepareJSON(), doPostBackScript);
    10611061
    10621062                        bool isInUpdatePanel = false;
© 2003 – 2021 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy