Ticket #5572: 5572_2.patch
File 5572_2.patch, 1.4 KB (added by , 13 years ago) |
---|
-
_source/plugins/scayt/plugin.js
46 46 oParams.customDictionaryIds = editor.config.scayt_customDictionaryIds || ''; 47 47 oParams.userDictionaryName = editor.config.scayt_userDictionaryName || ''; 48 48 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 50 58 oParams.onBeforeChange = function() 51 59 { 52 60 if ( !editor.checkDirty() ) 53 61 setTimeout( function(){ editor.resetDirty(); } ); 54 62 }; 55 63 56 64 var scayt_custom_params = window.scayt_custom_params; 57 65 if ( typeof scayt_custom_params == 'object') 58 66 { … … 334 342 this.setState( isEnabled ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_ON ); 335 343 336 344 var scayt_control = plugin.getScayt( editor ); 345 // Set focus on editable area when SCAYT turned on manually ( 5572 ticket ) 346 scayt_control.focus(); 337 347 scayt_control.setDisabled( isEnabled ); 338 348 } 339 349 else if ( !editor.config.scayt_autoStartup && plugin.engineLoaded >= 0 ) // Load first time