Ticket #8157: 8157_2.patch

File 8157_2.patch, 1.7 KB (added by Garry Yao, 12 years ago)
  • _source/plugins/selection/plugin.js

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    304304                                                                restoreEnabled = 1;
    305305                                                        });
    306306
    307                                                 // IE before version 8 will leave cursor blinking inside the document after
    308                                                 // editor blurred unless we clean up the selection. (#4716)
    309                                                 if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 )
     307                                                // [IE] Iframe will still keep the selection when blurred, if
     308                                                // focus is moved onto a non-editing host, e.g. link or button, but
     309                                                // it becomes a problem for the object type selection, since the resizer
     310                                                // handler attached on it will mark other part of the UI, especially
     311                                                // for the dialog. (#8157)
     312                                                // [IE<8] Even worse For old IEs, the cursor will not vanish even if
     313                                                // the selection has been moved to another text input in some cases. (#4716)
     314                                                //
     315                                                // Now the range restore is disabled, so we simply force IE to clean
     316                                                // up the selection before blur.
     317                                                CKEDITOR.env.ie && doc.getWindow().on( 'blur', function()
    310318                                                {
    311                                                         editor.on( 'blur', function( evt )
    312                                                         {
    313                                                                 // Try/Catch to avoid errors if the editor is hidden. (#6375)
    314                                                                 try
    315                                                                 {
    316                                                                         editor.document && editor.document.$.selection.empty();
    317                                                                 }
    318                                                                 catch (e) {}
    319                                                         });
    320                                                 }
     319                                                        // Error proof when the editor is not visible. (#6375)
     320                                                        try{ doc.$.selection.empty(); } catch ( er){}
     321                                                });
    321322
    322323                                                // Listening on document element ensures that
    323324                                                // scrollbar is included. (#5280)
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy