X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Ftab%2Fplugin.js;fp=_source%2Fplugins%2Ftab%2Fplugin.js;h=f2adcf99499c0eaa22540a48644688b147624904;hb=c6e377a02b54abc07129d72b632763c727476a15;hp=6f848b4f42e65bbbdd1ed972d8fee1ce21bebc0a;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6;p=ckeditor.git diff --git a/_source/plugins/tab/plugin.js b/_source/plugins/tab/plugin.js index 6f848b4..f2adcf9 100644 --- a/_source/plugins/tab/plugin.js +++ b/_source/plugins/tab/plugin.js @@ -5,6 +5,12 @@ For licensing, see LICENSE.html or http://ckeditor.com/license (function() { + var meta = + { + editorFocus : false, + modes : { wysiwyg:1, source:1 } + }; + var blurCommand = { exec : function( editor ) @@ -39,7 +45,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license tabText += '\xa0'; // Register the "tab" and "shiftTab" commands. - editor.addCommand( 'tab', + editor.addCommand( 'tab', CKEDITOR.tools.extend( { exec : function( editor ) { @@ -61,9 +67,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license return true; } - }); + }, meta ) ); - editor.addCommand( 'shiftTab', + editor.addCommand( 'shiftTab', CKEDITOR.tools.extend( { exec : function( editor ) { @@ -74,10 +80,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license return true; } - }); + }, meta ) ); - editor.addCommand( 'blur', blurCommand ); - editor.addCommand( 'blurBack', blurBackCommand ); + editor.addCommand( 'blur', CKEDITOR.tools.extend( blurCommand, meta ) ); + editor.addCommand( 'blurBack', CKEDITOR.tools.extend( blurBackCommand, meta ) ); } }); })(); @@ -104,7 +110,7 @@ CKEDITOR.dom.element.prototype.focusNext = function( ignoreChildren ) element = this.getNextSourceNode( ignoreChildren, CKEDITOR.NODE_ELEMENT ); - while( element ) + while ( element ) { if ( element.isVisible() && element.getTabIndex() === 0 ) { @@ -125,7 +131,7 @@ CKEDITOR.dom.element.prototype.focusNext = function( ignoreChildren ) element = this.getDocument().getBody().getFirst(); - while( ( element = element.getNextSourceNode( false, CKEDITOR.NODE_ELEMENT ) ) ) + while ( ( element = element.getNextSourceNode( false, CKEDITOR.NODE_ELEMENT ) ) ) { if ( !passedCurrent ) { @@ -188,7 +194,7 @@ CKEDITOR.dom.element.prototype.focusPrevious = function( ignoreChildren ) var element = this.getDocument().getBody().getLast(); - while( ( element = element.getPreviousSourceNode( false, CKEDITOR.NODE_ELEMENT ) ) ) + while ( ( element = element.getPreviousSourceNode( false, CKEDITOR.NODE_ELEMENT ) ) ) { if ( !passedCurrent ) {