Changeset 52951
- Timestamp:
- 03/18/2022 06:12:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/edit-comments.js
r50547 r52951 1020 1020 1021 1021 setTimeout(function() { 1022 var rtop, rbottom, scrollTop, vp, scrollBottom; 1022 var rtop, rbottom, scrollTop, vp, scrollBottom, 1023 isComposing = false; 1023 1024 1024 1025 rtop = $('#replyrow').offset().top; … … 1033 1034 window.scroll(0, rtop - 35); 1034 1035 1035 $('#replycontent').trigger( 'focus' ).on( 'keyup', function(e){ 1036 if ( e.which == 27 ) 1037 commentReply.revert(); // Close on Escape. 1038 }); 1036 $( '#replycontent' ) 1037 .trigger( 'focus' ) 1038 .on( 'keyup', function( e ) { 1039 // Close on Escape except when Input Method Editors (IMEs) are in use. 1040 if ( e.which === 27 && ! isComposing ) { 1041 commentReply.revert(); 1042 } 1043 } ) 1044 .on( 'compositionstart', function() { 1045 isComposing = true; 1046 } ); 1039 1047 }, 600); 1040 1048
Note: See TracChangeset
for help on using the changeset viewer.