X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=_source%2Fplugins%2Ftab%2Fplugin.js;h=f2adcf99499c0eaa22540a48644688b147624904;hb=c6e377a02b54abc07129d72b632763c727476a15;hp=55c210af2075bea48b02a50c8202931aff218733;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91;p=ckeditor.git diff --git a/_source/plugins/tab/plugin.js b/_source/plugins/tab/plugin.js index 55c210a..f2adcf9 100644 --- a/_source/plugins/tab/plugin.js +++ b/_source/plugins/tab/plugin.js @@ -1,10 +1,16 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. 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 ) {