Ticket #28279: esc.patch
| File esc.patch, 1.3 KB (added by , 12 years ago) |
|---|
-
src/wp-admin/js/wp-fullscreen.js
510 510 } 511 511 }); 512 512 513 $document.on( 'keydown.wp-fullscreen', function( event ) { 514 if ( 27 === event.which && s.visible ) { // Esc 513 $( window ).on( 'keyup', function( event ) { 514 // Turn fullscreen off when esc is pressed. 515 if ( 27 === event.keyCode && s.visible ) { 515 516 api.off(); 516 event.stopImmediatePropagation();517 517 } 518 518 }); 519 519 -
src/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.js
78 78 79 79 editor.addCommand( 'wpFullScreen', toggleFullscreen ); 80 80 81 editor.on( 'keyup', function( event ) { 82 // Turn fullscreen off when esc is pressed. 83 if ( event.keyCode === 27 && wp.editor.fullscreen.settings.visible ) { 84 wp.editor.fullscreen.off(); 85 } 86 } ); 87 81 88 editor.on( 'init', function() { 82 89 // Set the editor when initializing from whitin DFW 83 90 if ( editor.getParam('wp_fullscreen') ) {