]> git.immae.eu Git - perso/Immae/Projets/packagist/ludivine-ckeditor-component.git/blobdiff - sources/core/focusmanager.js
Update to 4.7.3
[perso/Immae/Projets/packagist/ludivine-ckeditor-component.git] / sources / core / focusmanager.js
index 6fc99698b6564b7e82db607e27c9ac4779b0838d..45c3137801b42d570e78a1515a477736a6910768 100644 (file)
                 * @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 );