Ticket #5572: 5572_2.patch

File 5572_2.patch, 1.4 KB (added by WebSpellChecker.net, 14 years ago)
  • _source/plugins/scayt/plugin.js

     
    4646                        oParams.customDictionaryIds = editor.config.scayt_customDictionaryIds || '';
    4747                        oParams.userDictionaryName = editor.config.scayt_userDictionaryName || '';
    4848                        oParams.sLang = editor.config.scayt_sLang || 'en_US';
    49 
     49                       
     50                        // Introduce SCAYT onLoad call back (#5572 and #5466 tickets)
     51                        oParams.onLoad = function()
     52                        {
     53                                // Set focus on editable area when SCAYT loaded ( 5572 ticket )
     54                                if(!editor.config.scayt_autoStartup)
     55                                        this.focus();
     56                        };
     57                               
    5058                        oParams.onBeforeChange = function()
    5159                        {
    5260                                if ( !editor.checkDirty() )
    5361                                        setTimeout( function(){ editor.resetDirty(); } );
    5462                        };
    55 
     63                       
    5664                        var scayt_custom_params = window.scayt_custom_params;
    5765                        if ( typeof scayt_custom_params == 'object')
    5866                        {
     
    334342                                this.setState( isEnabled ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_ON );
    335343
    336344                                var scayt_control = plugin.getScayt( editor );
     345                                // Set focus on editable area when SCAYT turned on manually ( 5572 ticket )
     346                                scayt_control.focus();
    337347                                scayt_control.setDisabled( isEnabled );
    338348                        }
    339349                        else if ( !editor.config.scayt_autoStartup && plugin.engineLoaded >= 0 )        // Load first time
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy