--- a/wp/wp-admin/js/edit-comments.js Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-admin/js/edit-comments.js Tue Sep 27 16:37:53 2022 +0200
@@ -1019,7 +1019,8 @@
}
setTimeout(function() {
- var rtop, rbottom, scrollTop, vp, scrollBottom;
+ var rtop, rbottom, scrollTop, vp, scrollBottom,
+ isComposing = false;
rtop = $('#replyrow').offset().top;
rbottom = rtop + $('#replyrow').height();
@@ -1032,10 +1033,17 @@
else if ( rtop - 20 < scrollTop )
window.scroll(0, rtop - 35);
- $('#replycontent').trigger( 'focus' ).on( 'keyup', function(e){
- if ( e.which == 27 )
- commentReply.revert(); // Close on Escape.
- });
+ $( '#replycontent' )
+ .trigger( 'focus' )
+ .on( 'keyup', function( e ) {
+ // Close on Escape except when Input Method Editors (IMEs) are in use.
+ if ( e.which === 27 && ! isComposing ) {
+ commentReply.revert();
+ }
+ } )
+ .on( 'compositionstart', function() {
+ isComposing = true;
+ } );
}, 600);
return false;