Ticket #8925: 8925_2.patch

File 8925_2.patch, 2.0 KB (added by Garry Yao, 12 years ago)
  • _source/plugins/wysiwygarea/plugin.js

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    727727                                                        {
    728728                                                                var doc = editor.document;
    729729
    730                                                                 if ( editable && CKEDITOR.env.gecko && CKEDITOR.env.version >= 10900 )
    731                                                                         blinkCursor();
    732                                                                 else if ( CKEDITOR.env.opera )
     730                                                                if ( CKEDITOR.env.opera )
    733731                                                                        doc.getBody().focus();
    734732                                                                // Webkit needs focus for the first time on the HTML element. (#6153)
    735733                                                                else if ( CKEDITOR.env.webkit )
     
    12081206                        editor.addCss( 'html {  _overflow-y: scroll; cursor: text;      *cursor:auto;}' );
    12091207                        // Use correct cursor for these elements
    12101208                        editor.addCss( 'img, input, textarea { cursor: default;}' );
    1211 
    1212                         // Switch on design mode for a short while and close it after then.
    1213                         function blinkCursor( retry )
    1214                         {
    1215                                 if ( editor.readOnly )
    1216                                         return;
    1217 
    1218                                 CKEDITOR.tools.tryThese(
    1219                                         function()
    1220                                         {
    1221                                                 editor.document.$.designMode = 'on';
    1222                                                 setTimeout( function()
    1223                                                 {
    1224                                                         editor.document.$.designMode = 'off';
    1225                                                         if ( CKEDITOR.currentInstance == editor )
    1226                                                                 editor.document.getBody().focus();
    1227                                                 }, 50 );
    1228                                         },
    1229                                         function()
    1230                                         {
    1231                                                 // The above call is known to fail when parent DOM
    1232                                                 // tree layout changes may break design mode. (#5782)
    1233                                                 // Refresh the 'contentEditable' is a cue to this.
    1234                                                 editor.document.$.designMode = 'off';
    1235                                                 var body = editor.document.getBody();
    1236                                                 body.setAttribute( 'contentEditable', false );
    1237                                                 body.setAttribute( 'contentEditable', true );
    1238                                                 // Try it again once..
    1239                                                 !retry && blinkCursor( 1 );
    1240                                         });
    1241                         }
    12421209
    12431210                        // Disable form elements editing mode provided by some browers. (#5746)
    12441211                        editor.on( 'insertElement', function ( evt )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy