X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2Fpackagist%2Fludivine-ckeditor-component.git;a=blobdiff_plain;f=sources%2Fcore%2Ffocusmanager.js;fp=sources%2Fcore%2Ffocusmanager.js;h=45c3137801b42d570e78a1515a477736a6910768;hp=6fc99698b6564b7e82db607e27c9ac4779b0838d;hb=1794320dcfdfcd19572fb1676294f9853a6bbc20;hpb=7183f6a6a21ad9124e70c997e0168459f377a9f2 diff --git a/sources/core/focusmanager.js b/sources/core/focusmanager.js index 6fc9969..45c3137 100644 --- a/sources/core/focusmanager.js +++ b/sources/core/focusmanager.js @@ -147,34 +147,28 @@ * @member CKEDITOR.focusManager */ blur: function( noDelay ) { - if ( this._.locked ) + if ( this._.locked ) { return; + } function doBlur() { - var editor = this._.editor; - if ( this.hasFocus ) { this.hasFocus = false; - // Blink browsers leave selection in `[contenteditable=true]` - // when it's blurred and it's neccessary to remove it manually for inline editor. (#13446) - if ( CKEDITOR.env.chrome && editor.editable().isInline() ) { - editor.window.$.getSelection().removeAllRanges(); - } - var ct = this._.editor.container; ct && ct.removeClass( 'cke_focus' ); this._.editor.fire( 'blur' ); } } - if ( this._.timer ) + if ( this._.timer ) { clearTimeout( this._.timer ); + } var delay = CKEDITOR.focusManager._.blurDelay; - if ( noDelay || !delay ) + if ( noDelay || !delay ) { doBlur.call( this ); - else { + } else { this._.timer = CKEDITOR.tools.setTimeout( function() { delete this._.timer; doBlur.call( this );