Ticket #4269: 4269.patch
File 4269.patch, 3.1 KB (added by , 15 years ago) |
---|
-
_source/plugins/dialogui/plugin.js
214 214 me.getInputElement().on( 'keydown', function( evt ) 215 215 { 216 216 if ( evt.data.getKeystroke() == 13 ) 217 { 217 218 keyPressedOnMe = true; 219 evt.data.preventDefault( true ); 220 } 218 221 } ); 219 222 220 223 // Lower the priority this 'keyup' since 'ok' will close the dialog.(#3749) … … 224 227 { 225 228 dialog.getButton( 'ok' ) && dialog.getButton( 'ok' ).click(); 226 229 keyPressedOnMe = false; 230 evt.data.preventDefault( true ); 227 231 } 228 232 }, null, null, 1000 ); 233 234 // Prevent enter key from bubbling up. (#4269) 235 // Needed for FF, Safari, Opera. 236 me.getInputElement().on( 'keypress', function( evt ) 237 { 238 if ( evt.data.getKeystroke() == 13 ) 239 evt.data.preventDefault( true ); 240 } ); 229 241 } ); 230 242 231 243 /** @ignore */ -
_source/plugins/dialog/plugin.js
623 623 624 624 CKEDITOR.document.on( 'keydown', accessKeyDownHandler ); 625 625 CKEDITOR.document.on( 'keyup', accessKeyUpHandler ); 626 627 // Prevent Esc key from bubbling up. (#4269) 628 for ( var event in { keyup: 1, keydown : 1, keypress : 1 }) 629 CKEDITOR.document.on( event, preventEscBubbling ); 626 630 } 627 631 else 628 632 { … … 749 753 // Remove access key handlers. 750 754 CKEDITOR.document.removeListener( 'keydown', accessKeyDownHandler ); 751 755 CKEDITOR.document.removeListener( 'keyup', accessKeyUpHandler ); 756 CKEDITOR.document.removeListener( 'keypress', accessKeyUpHandler ); 752 757 758 // Prevent Esc key from bubbling up. (#4269) 759 for ( var event in { keyup: 1, keydown : 1, keypress : 1 }) 760 CKEDITOR.document.removeListener( event, preventEscBubbling ); 761 753 762 var editor = this._.editor; 754 763 editor.focus(); 755 764 … … 1836 1845 { 1837 1846 }; 1838 1847 1848 var preventEscBubbling = function( e ) 1849 { 1850 e.data.getKeystroke() == 27 && e.data.preventDefault( true ); 1851 }; 1852 1839 1853 (function() 1840 1854 { 1841 1855 CKEDITOR.ui.dialog = -
CHANGES.html
47 47 <li><a href="http://dev.fckeditor.net/ticket/3898">#3898</a> : Added validation for URL presentance in Image dialog.</li> 48 48 <li><a href="http://dev.fckeditor.net/ticket/3528">#3528</a> : Fixed Context Menu issue when triggered using Shift+F10.</li> 49 49 <li><a href="http://dev.fckeditor.net/ticket/4028">#4028</a> : Maximize control's tool tip was wrong once it is maximized.</li> 50 <li><a href="http://dev.fckeditor.net/ticket/4269">#4269</a> : "Esc" and "Enter" keystrokes are not handled when a dialogue box is opened which causes the form post automatically.</li> 50 51 </ul> 51 52 <h3> 52 53 CKEditor 3.0</h3>