Ticket #3160: 3160_2.patch

File 3160_2.patch, 1.2 KB (added by Frederico Caldeira Knabben, 15 years ago)
  • _source/plugins/wysiwygarea/plugin.js

     
    241241                                                if ( keystrokeHandler )
    242242                                                        keystrokeHandler.attach( domDocument );
    243243
    244                                                 editor.fire( 'contentDom' );
    245 
    246244                                                // Adds the document body as a context menu target.
    247245                                                if ( editor.contextMenu )
    248246                                                        editor.contextMenu.addTarget( domDocument );
    249247
    250                                                 if ( fireMode )
    251                                                 {
    252                                                         editor.mode = 'wysiwyg';
    253                                                         editor.fire( 'mode' );
    254                                                         fireMode = false;
    255                                                 }
     248                                                setTimeout( function()
     249                                                        {
     250                                                                editor.fire( 'contentDom' );
    256251
    257                                                 isLoadingData = false;
     252                                                                if ( fireMode )
     253                                                                {
     254                                                                        editor.mode = 'wysiwyg';
     255                                                                        editor.fire( 'mode' );
     256                                                                        fireMode = false;
     257                                                                }
    258258
    259                                                 if ( isPendingFocus )
    260                                                         editor.focus();
     259                                                                isLoadingData = false;
     260
     261                                                                if ( isPendingFocus )
     262                                                                {
     263                                                                        editor.focus();
     264                                                                        isPendingFocus = false;
     265                                                                }
     266                                                        },
     267                                                        0 );
    261268                                        };
    262269
    263270                                        editor.addMode( 'wysiwyg',
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy