X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Feditingblock%2Fplugin.js;h=dfbe069d0f53dad966818e6fba645f34700b86b5;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hp=906de6bc59bb735b5b5ffe87a66d171961ed472c;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6;p=ckeditor.git diff --git a/_source/plugins/editingblock/plugin.js b/_source/plugins/editingblock/plugin.js index 906de6b..dfbe069 100644 --- a/_source/plugins/editingblock/plugin.js +++ b/_source/plugins/editingblock/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -95,21 +95,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Do that once only. event.removeListener(); - // Grab editor focus if the editor container is focused. (#3104) - var focusGrabber = editor.container; - - // Safari 3 can't handle tabindex in all elements, so we do - // a trick to make it move the focus to the editor on TAB. - if ( CKEDITOR.env.webkit && CKEDITOR.env.version < 528 ) - { - var tabIndex = editor.config.tabIndex || editor.element.getAttribute( 'tabindex' ) || 0; - focusGrabber = focusGrabber.append( CKEDITOR.dom.element.createFromHtml( - '' ) ); - } - - focusGrabber.on( 'focus', function() + // Redirect the focus into editor for webkit. (#5713) + CKEDITOR.env.webkit && editor.container.on( 'focus', function() { editor.focus(); }); @@ -123,8 +110,15 @@ For licensing, see LICENSE.html or http://ckeditor.com/license setTimeout( function(){ editor.fireOnce( 'instanceReady' ); CKEDITOR.fire( 'instanceReady', null, editor ); - } ); + }, 0 ); }); + + editor.on( 'destroy', function () + { + // -> currentMode.unload( holderElement ); + if ( this.mode ) + this._.modes[ this.mode ].unload( this.getThemeSpace( 'contents' ) ); + }); } }); @@ -224,7 +218,6 @@ CKEDITOR.config.startupMode = 'wysiwyg'; * @example * config.startupFocus = true; */ -CKEDITOR.config.startupFocus = false; /** * Whether to render or not the editing block area in the editor interface. @@ -234,3 +227,22 @@ CKEDITOR.config.startupFocus = false; * config.editingBlock = false; */ CKEDITOR.config.editingBlock = true; + +/** + * Fired when a CKEDITOR instance is created, fully initialized and ready for interaction. + * @name CKEDITOR#instanceReady + * @event + * @param {CKEDITOR.editor} editor The editor instance that has been created. + */ + +/** + * Fired when the CKEDITOR instance is created, fully initialized and ready for interaction. + * @name CKEDITOR.editor#instanceReady + * @event + */ + +/** + * Fired before changing the editing mode + * @name CKEDITOR.editor#beforeModeUnload + * @event + */