X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fdialogui%2Fplugin.js;h=29db79c0f10f28ea5f2926358877708925ee6af1;hp=963c80c45d6030d1cd7345da7867c864edc2889b;hb=6e682412d5cc0dfaedb376482e585bf2989c6863;hpb=2f22c0c38f17e75be5541089076885442aaa2377 diff --git a/_source/plugins/dialogui/plugin.js b/_source/plugins/dialogui/plugin.js index 963c80c..29db79c 100644 --- a/_source/plugins/dialogui/plugin.js +++ b/_source/plugins/dialogui/plugin.js @@ -157,7 +157,7 @@ CKEDITOR.plugins.add( 'dialogui' ); if ( elementDefinition.labelLayout != 'horizontal' ) html.push( '', @@ -240,30 +240,6 @@ CKEDITOR.plugins.add( 'dialogui' ); if ( elementDefinition.inputStyle ) attributes.style = elementDefinition.inputStyle; - // If user presses Enter in a text box, it implies clicking OK for the dialog. - var me = this, keyPressedOnMe = false; - dialog.on( 'load', function() - { - me.getInputElement().on( 'keydown', function( evt ) - { - if ( evt.data.getKeystroke() == 13 ) - keyPressedOnMe = true; - } ); - - // Lower the priority this 'keyup' since 'ok' will close the dialog.(#3749) - me.getInputElement().on( 'keyup', function( evt ) - { - if ( evt.data.getKeystroke() == 13 && keyPressedOnMe ) - { - dialog.getButton( 'ok' ) && setTimeout( function () - { - dialog.getButton( 'ok' ).click(); - }, 0 ); - keyPressedOnMe = false; - } - }, null, null, 1000 ); - } ); - /** @ignore */ var innerHTML = function() { @@ -677,6 +653,7 @@ CKEDITOR.plugins.add( 'dialogui' ); ' frameborder="0"' + ' allowtransparency="0"' + ' class="cke_dialog_ui_input_file"' + + ' role="presentation"' + ' id="', _.frameId, '"' + ' title="', elementDefinition.label, '"' + ' src="javascript:void(' ]; @@ -1443,11 +1420,17 @@ CKEDITOR.plugins.add( 'dialogui' ); if ( elementDefinition.size ) size = elementDefinition.size - ( CKEDITOR.env.ie ? 7 : 0 ); // "Browse" button is bigger in IE. + var inputId = _.frameId + '_input'; + frameDocument.$.write( [ '', '
', - '', + CKEDITOR.tools.htmlEncode( elementDefinition.label ), + '', + '