Changeset 5068
- Timestamp:
- 2010-02-09 16:15:42 (6 weeks ago)
- Location:
- CKEditor/branches/features/aria/_source/plugins
- Files:
-
- 3 modified
-
dialog/plugin.js (modified) (1 diff)
-
dialogui/plugin.js (modified) (2 diffs)
-
link/dialogs/link.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/branches/features/aria/_source/plugins/dialog/plugin.js
r5065 r5068 422 422 this._.currentFocusIndex = -1; 423 423 setupFocus(); 424 changeFocus( true ); 424 425 // Decide where to put the initial focus. 426 if ( definition.onFocus ) 427 { 428 var initialFocus = definition.onFocus.call( this ); 429 // Focus the field that the user specified. 430 initialFocus && initialFocus.focus(); 431 } 432 // Focus the first field in layout order. 433 else 434 changeFocus( true ); 435 425 436 /* 426 437 * IE BUG: If the initial focus went into a non-text element (e.g. button), -
CKEditor/branches/features/aria/_source/plugins/dialogui/plugin.js
r5059 r5068 768 768 769 769 // Look for focus function in definition. 770 if ( elementDefinition.focus ) 770 var focus = elementDefinition.focus; 771 if ( focus ) 771 772 { 772 773 var oldFocus = this.focus; … … 774 775 { 775 776 oldFocus.call( this ); 776 elementDefinition.focus.call( this );777 typeof focus == 'function' && focus.call( this ); 777 778 this.fire( 'focus' ); 778 779 }; -
CKEditor/branches/features/aria/_source/plugins/link/dialogs/link.js
r5065 r5068 476 476 this.allowOnChange = true; 477 477 478 // Raise the tab order of this field to top in case of URL.479 var linkType = this.getDialog().getContentElement( 'info', 'linkType' );480 if ( linkType && linkType.getValue() == 'url' )481 this.tabIndex = 1;482 483 478 }, 484 479 commit : function( data ) … … 615 610 style : 'text-align: center;', 616 611 html : '<div role="label" tabIndex="-1">' + CKEDITOR.tools.htmlEncode( editor.lang.link.noAnchors ) + '</div>', 617 focus : function(){}, 612 // Focus the first element defined in above html. 613 focus : true, 618 614 setup : function( data ) 619 615 { … … 1365 1361 this.hidePage( 'target' ); //Hide Target tab. 1366 1362 1363 }, 1364 // Inital focus on 'url' field if link is of type URL. 1365 onFocus : function() 1366 { 1367 var linkType = this.getContentElement( 'info', 'linkType' ); 1368 if ( linkType && linkType.getValue() == 'url' ) 1369 return this.getContentElement( 'info', 'url' ); 1367 1370 } 1368 1371 };