/*\r
-Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
\r
initPrivateObject.call( this, elementDefinition );\r
var domId = this._.inputId = CKEDITOR.tools.getNextId() + '_textInput',\r
- attributes = { 'class' : 'cke_dialog_ui_input_' + elementDefinition.type, id : domId, type : 'text' },\r
+ attributes = { 'class' : 'cke_dialog_ui_input_' + elementDefinition.type, id : domId, type : elementDefinition.type },\r
i;\r
\r
// Set the validator, if any.\r
var innerHTML = function()\r
{\r
var html = [];\r
- legendLabel && html.push( '<legend>' + legendLabel + '</legend>' );\r
+ legendLabel && html.push( '<legend' +\r
+ ( elementDefinition.labelStyle ? ' style="' + elementDefinition.labelStyle + '"' : '' ) +\r
+ '>' + legendLabel + '</legend>' );\r
for ( var i = 0; i < childHtmlList.length; i++ )\r
html.push( childHtmlList[ i ] );\r
return html.join( '' );\r
/** @ignore */\r
onClick : function( dialog, func )\r
{\r
- this.on( 'click', func );\r
+ this.on( 'click', function()\r
+ {\r
+ // Some browsers (Chrome, IE8, IE7 compat mode) don't move\r
+ // focus to clicked button. Force this.\r
+ this.getElement().focus();\r
+ func.apply( this, arguments );\r
+ });\r
}\r
}, true ),\r
\r