Ticket #3593: 3593_2.patch

File 3593_2.patch, 1.9 KB (added by Garry Yao, 15 years ago)
  • _source/plugins/wysiwygarea/plugin.js

     
    349349                                                        // Disable and re-enable the body to avoid IE from
    350350                                                        // taking the editing focus at startup. (#141 / #523)
    351351                                                        body.disabled = true;
    352                                                         body.contentEditable = true;
    353352                                                        body.removeAttribute( 'disabled' );
    354353                                                }
    355                                                 else
    356                                                         // Avoid opening design mode in a frame window thread,
    357                                                         // which will cause host page scrolling.(#4397)
    358                                                         setTimeout( function(){
    359                                                                 domDocument.$.designMode = 'on';
    360                                                         }, 0 );
     354                                                // Firefox require design-mode been turned on to make
     355                                                // the cursor blinking when editing frame window gain
     356                                                // keyboard focus.
     357                                                else if ( CKEDITOR.env.gecko )
     358                                                        domDocument.designMode = 'on';
    361359
     360                                                // Standard way to enable rich-text editing on the
     361                                                // whole page beside Firefox2.
     362                                                body.contentEditable = true;
     363
    362364                                                // IE, Opera and Safari may not support it and throw
    363365                                                // errors.
    364366                                                try { domDocument.execCommand( 'enableObjectResizing', false, !editor.config.disableObjectResizing ) ; } catch(e) {}
     
    422424                                                focusTarget.on( 'blur', function()
    423425                                                        {
    424426                                                                editor.focusManager.blur();
     427                                                                if( CKEDITOR.env.gecko )
     428                                                                        editor.document.$.designMode = 'on';
     429
    425430                                                        });
    426431
    427432                                                focusTarget.on( 'focus', function()
    428433                                                        {
    429434                                                                editor.focusManager.focus();
    430                                                         });
     435
     436                                                                if( CKEDITOR.env.gecko )
     437                                                                        setTimeout( function()
     438                                                                        {
     439                                                                                editor.document.$.designMode = 'off';
     440                                                                        } );
     441                                                        });
    431442
    432443                                                var keystrokeHandler = editor.keystrokeHandler;
    433444                                                if ( keystrokeHandler )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy