var me = this;\r
dialog.on( 'load', function()\r
{\r
- if ( me.getInputElement() )\r
+ var input = me.getInputElement();\r
+ if ( input )\r
{\r
- me.getInputElement().on( 'focus', function()\r
+ var focusClass = me.type in { 'checkbox' : 1, 'ratio' : 1 } && CKEDITOR.env.ie && CKEDITOR.env.version < 8 ? 'cke_dialog_ui_focused' : '';\r
+ input.on( 'focus', function()\r
{\r
dialog._.tabBarMode = false;\r
dialog._.hasFocus = true;\r
me.fire( 'focus' );\r
- }, me );\r
+ focusClass && this.addClass( focusClass );\r
+\r
+ });\r
+\r
+ input.on( 'blur', function()\r
+ {\r
+ me.fire( 'blur' );\r
+ focusClass && this.removeClass( focusClass );\r
+ });\r
}\r
} );\r
\r
/** @ignore */\r
exec : function( editor )\r
{\r
- editor.openDialog( this.dialogName );\r
+ // Special treatment for Opera. (#8031)\r
+ CKEDITOR.env.opera ?\r
+ CKEDITOR.tools.setTimeout( function() { editor.openDialog( this.dialogName ) }, 0, this )\r
+ : editor.openDialog( this.dialogName );\r
},\r
\r
// Dialog commands just open a dialog ui, thus require no undo logic,\r
integerRegex = /^\d*$/,\r
numberRegex = /^\d*(?:\.\d+)?$/,\r
htmlLengthRegex = /^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,\r
- cssLengthRegex = /^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i;\r
+ cssLengthRegex = /^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,\r
+ inlineStyleRegex = /^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;\r
\r
CKEDITOR.VALIDATE_OR = 1;\r
CKEDITOR.VALIDATE_AND = 2;\r
return this.functions( function( val ){ return htmlLengthRegex.test( CKEDITOR.tools.trim( val ) ); }, msg );\r
},\r
\r
+ 'inlineStyle' : function( msg )\r
+ {\r
+ return this.functions( function( val ){ return inlineStyleRegex.test( CKEDITOR.tools.trim( val ) ); }, msg );\r
+ },\r
+\r
equals : function( value, msg )\r
{\r
return this.functions( function( val ){ return val == value; }, msg );\r