Prevent Esc from closing editor during composition (#4738) * fix(IME): Prevent Esc from closing editor during composition When using a Chinese IME, pressing the Escape key during composition should cancel the composition, not close the message editor. This commit fixes the issue by adding a check for `!e.isComposing` to the 'keyup' event listener for the Escape key in `public/script.js`. This ensures that the editor is only closed when the Escape key is pressed outside of an IME composition session. * fix(IME): Change the handler of 'Escape' from 'keyup' to 'keydown' --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>

73c1bc2d039b3290a034220014feb5c479ac8455

fathom0324 <221750481+fathom0324@users.noreply.github.com>

Signed
1 files changed, +2 -2Ignore whitespace
public/script.js+2 -2
@@ -11374,8 +11374,8 @@ jQuery(async function () {
1137411374 }
1137511375 });
1137611376
1137711377 $(document).on('keyupkeydown', function (e) {
1137811378 if (e.key === 'Escape' && !e.isComposing) {
1137911379 const isEditVisible = $('#curEditTextarea').is(':visible') || $('.reasoning_edit_textarea').length > 0;
1138011380 if (isEditVisible && power_user.auto_save_msg_edits === false) {
1138111381 closeMessageEditor('all');