Changeset 30625
- Timestamp:
- 11/29/2014 02:44:37 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/editor-expand.js
r30593 r30625 877 877 // fadeIn and return on Escape and keyboard shortcut Alt+Shift+W. 878 878 if ( key === 27 || ( key === 87 && event.altKey && event.shiftKey ) ) { 879 fadeIn( );879 fadeIn( event ); 880 880 return; 881 881 } … … 995 995 } 996 996 997 function fadeIn( ) {997 function fadeIn( event ) { 998 998 if ( faded ) { 999 999 faded = false; … … 1009 1009 $overlay.off( 'mouseenter.focus mouseleave.focus mousemove.focus touchstart.focus' ); 1010 1010 1011 $editor.on( 'mouseenter.focus', function() { 1012 if ( $.contains( $editor.get( 0 ), document.activeElement ) || editorHasFocus ) { 1013 fadeOut(); 1014 } 1015 } ); 1011 /* 1012 * When fading in, temporarily watch for refocus and fade back out - helps 1013 * with 'accidental' editor exits with the mouse. When fading in and the event 1014 * is a key event (Escape or Alt+Shift+W) don't watch for refocus. 1015 */ 1016 if ( 'undefined' === typeof event ) { 1017 $editor.on( 'mouseenter.focus', function() { 1018 if ( $.contains( $editor.get( 0 ), document.activeElement ) || editorHasFocus ) { 1019 fadeOut(); 1020 } 1021 } ); 1022 } 1016 1023 1017 1024 focusLostTimer = setTimeout( function() {
Note: See TracChangeset
for help on using the changeset viewer.