X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fdialog%2Fplugin.js;h=b41cd1078eaea0ac89b745cac675fe60b4ca6e9d;hp=c052120dcb0c6119e0aff1dd9ee387e97097ae27;hb=8761695d9b70afe75905deaac88f78c1f8aeb32d;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91 diff --git a/_source/plugins/dialog/plugin.js b/_source/plugins/dialog/plugin.js index c052120..b41cd10 100644 --- a/_source/plugins/dialog/plugin.js +++ b/_source/plugins/dialog/plugin.js @@ -272,6 +272,10 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3; break; } focusList[ currentIndex ].focus(); + + // Select whole field content. + if ( focusList[ currentIndex ].type == 'text' ) + focusList[ currentIndex ].select(); } function focusKeydownHandler( evt ) @@ -623,6 +627,10 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3; CKEDITOR.document.on( 'keydown', accessKeyDownHandler ); CKEDITOR.document.on( 'keyup', accessKeyUpHandler ); + + // Prevent some keys from bubbling up. (#4269) + for ( var event in { keyup :1, keydown :1, keypress :1 } ) + CKEDITOR.document.on( event, preventKeyBubbling ); } else { @@ -749,6 +757,11 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3; // Remove access key handlers. CKEDITOR.document.removeListener( 'keydown', accessKeyDownHandler ); CKEDITOR.document.removeListener( 'keyup', accessKeyUpHandler ); + CKEDITOR.document.removeListener( 'keypress', accessKeyUpHandler ); + + // Remove bubbling-prevention handler. (#4269) + for ( var event in { keyup :1, keydown :1, keypress :1 } ) + CKEDITOR.document.removeListener( event, preventKeyBubbling ); var editor = this._.editor; editor.focus(); @@ -1426,6 +1439,9 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3; magnetDistance = editor.config.dialog_magnetDistance, margins = skinData[ editor.skinName ].margins || [ 0, 0, 0, 0 ]; + if ( typeof magnetDistance == 'undefined' ) + magnetDistance = 20; + function mouseMoveHandler( evt ) { var dialogSize = dialog.getSize(), @@ -1649,7 +1665,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3; '