mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-13 10:00:36 +01:00
#1696 Don't cancel generation on first Escape press if editing a message
This commit is contained in:
parent
0540af2bfe
commit
ed77f4763a
@ -9292,13 +9292,16 @@ jQuery(async function () {
|
||||
|
||||
$(document).keyup(function (e) {
|
||||
if (e.key === 'Escape') {
|
||||
if (power_user.auto_save_msg_edits === false) {
|
||||
const isEditVisible = $('#curEditTextarea').is(':visible');
|
||||
if (isEditVisible && power_user.auto_save_msg_edits === false) {
|
||||
closeMessageEditor();
|
||||
$('#send_textarea').focus();
|
||||
return;
|
||||
}
|
||||
if (power_user.auto_save_msg_edits === true) {
|
||||
if (isEditVisible && power_user.auto_save_msg_edits === true) {
|
||||
$(`#chat .mes[mesid="${this_edit_mes_id}"] .mes_edit_done`).click();
|
||||
$('#send_textarea').focus();
|
||||
return;
|
||||
}
|
||||
if (!this_edit_mes_id && $('#mes_stop').is(':visible')) {
|
||||
$('#mes_stop').trigger('click');
|
||||
|
Loading…
Reference in New Issue
Block a user