+ // Don't do that for a target that handles ENTER.\r
+ var target = evt.data.getTarget();\r
+ if ( !target.is( 'a', 'button', 'select', 'textarea' ) && ( !target.is( 'input' ) || target.$.type != 'button' ) )\r
+ {\r
+ button = this.getButton( 'ok' );\r
+ button && CKEDITOR.tools.setTimeout( button.click, 0, button );\r
+ processed = 1;\r
+ }\r
+ stopPropagation = 1; // Always block the propagation (#4269)\r
+ }\r
+ else if ( keystroke == 27 /*ESC*/ )\r
+ {\r
+ button = this.getButton( 'cancel' );\r
+\r
+ // If there's a Cancel button, click it, else just fire the cancel event and hide the dialog.\r
+ if ( button )\r
+ CKEDITOR.tools.setTimeout( button.click, 0, button );\r
+ else\r
+ {\r
+ if ( this.fire( 'cancel', { hide : true } ).hide !== false )\r
+ this.hide();\r
+ }\r
+ stopPropagation = 1; // Always block the propagation (#4269)\r