Ticket #5441: 5441.patch

File 5441.patch, 1.8 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/wysiwygarea/plugin.js

     
    741741                                                        {
    742742                                                                this.onDispose();
    743743
     744                                                                /*
     745                                                                 * IE BUG: When destroying editor DOM with the selection remains inside
     746                                                                 * editing area would break IE7/8's selection system, we have to put the editing
     747                                                                 * iframe offline first. (#3812)
     748                                                                 */
     749                                                                iframe.remove();
     750
    744751                                                                editor.window = editor.document = iframe = mainElement = isPendingFocus = null;
    745752
    746753                                                                editor.fire( 'contentDomUnload' );
  • _source/themes/default/theme.js

     
    232232                        container.clearCustomData();
    233233                        editor.element.clearCustomData();
    234234
    235                         /*
    236                          * IE BUG: Removing the editor DOM elements while the selection is inside
    237                          * the editing area would break IE7/8's selection system. So we need to put
    238                          * the selection back to the parent document without scrolling the window.
    239                          * (#3812)
    240                          */
    241                         if ( CKEDITOR.env.ie )
    242                         {
    243                                 container.setStyle( 'display', 'none' );
    244 
    245                                 var $range = document.body.createTextRange();
    246                                 $range.moveToElementText( container.$ );
    247                                 try
    248                                 {
    249                                         // Putting the selection to a display:none element - this will certainly
    250                                         // fail. But! We've just put the selection document back to the parent
    251                                         // document without scrolling the window!
    252                                         $range.select();
    253                                 }
    254                                 catch ( e ) {}
    255                         }
    256 
    257235                        if ( container )
    258236                                container.remove();
    259237
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy