Ticket #30450: 30450.patch
File 30450.patch, 1.9 KB (added by , 10 years ago) |
---|
-
src/wp-admin/js/editor-expand.js
858 858 function fadeOut( event ) { 859 859 var key = event && event.keyCode; 860 860 861 if ( key === 27 ) { 861 // fadeIn and return on Escape and keyboard shortcut Alt+Shift+F. 862 if ( key === 27 || ( event && ( event.altKey && event.shiftKey && 70 === key ) ) ) { 862 863 fadeIn(); 863 864 return; 864 865 } … … 1017 1018 return $.contains( $el.get( 0 ), document.activeElement ); 1018 1019 } 1019 1020 1020 // The focus sed node is before or behind the editor area, and not ouside the wrap.1021 // The focused node is before or behind the editor area, and not outside the wrap. 1021 1022 if ( ( position === 2 || position === 4 ) && ( hasFocus( $menuWrap ) || hasFocus( $wrap ) || hasFocus( $footer ) ) ) { 1022 1023 fadeIn(); 1023 1024 } … … 1089 1090 button.active( false ); 1090 1091 } ); 1091 1092 }, 1092 tooltip: 'Distraction Free Writing' 1093 tooltip: 'Distraction Free Writing', 1094 shortcut: 'Alt+Shift+F' 1093 1095 } ); 1096 1097 editor.addCommand( 'toggleFocusV2', toggle ); 1098 editor.addShortcut( 'alt+shift+f', '', 'toggleFocusV2' ); 1094 1099 } ); 1095 1100 1101 $document.on( 'keydown.focus', toggleViaKeyboard ); 1102 1103 function toggleViaKeyboard( event ) { 1104 var key = event && event.keyCode; 1105 1106 if ( event.altKey && event.shiftKey && 70 === key ) { 1107 toggle(); 1108 } 1109 } 1110 1096 1111 $document.on( 'tinymce-editor-init.focus', function( event, editor ) { 1097 1112 var mceBind, mceUnbind; 1098 1113 … … 1128 1143 1129 1144 $document.on( 'dfw-on.focus', mceBind ).on( 'dfw-off.focus', mceUnbind ); 1130 1145 1131 // Make sure the body focus ses when clicking outside it.1146 // Make sure the body focuses when clicking outside it. 1132 1147 editor.on( 'click', function( event ) { 1133 1148 if ( event.target === editor.getDoc().documentElement ) { 1134 1149 editor.focus();