Ticket #5570: 5572.patch

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

     
    5353                                        // Draw down word marker to avoid being covered by background-color style.(#5466)
    5454                                        if ( !( CKEDITOR.env.ie && CKEDITOR.env.version < 8 ) )
    5555                                                this.addStyle( this.selectorCss(), 'padding-bottom: 2px !important;' );
     56
     57                                        // Call scayt_control.focus when SCAYT loaded
     58                                        // and only if editor has focus
     59                                        if( editor.focusManager.hasFocus )
     60                                                this.focus( );
     61
    5662                                };
    5763
    5864                        oParams.onBeforeChange = function()
     
    396402                                this.setState( isEnabled ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_ON );
    397403
    398404                                var scayt_control = plugin.getScayt( editor );
     405                                // the place where the status of editor focus should be restored
     406                                // after there will be ability to store its state before SCAYT button click
     407                                // if (storedFocusState is focused )
     408                                //   scayt_control.focus();
     409                                //
     410                                // now focus is set certainly
     411                                scayt_control.focus( );
    399412                                scayt_control.setDisabled( isEnabled );
    400413                        }
    401414                        else if ( !autoStartup && plugin.engineLoaded >= 0 )    // Load first time
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy