Abort Send and Continue while editing a message

1b3db273891c1ba8c781d2f691ad2e41937ca2aa

FriedCaper <friedcaper@proton.me>

1 files changed, +3 -0Showing whitespace changes
public/script.js+3 -0
@@ -1885,6 +1885,7 @@ export async function reloadCurrentChat() {
1885export async function sendTextareaMessage() {1885export async function sendTextareaMessage() {
1886 if (is_send_press) return;1886 if (is_send_press) return;
1887 if (isExecutingCommandsFromChatInput) return;1887 if (isExecutingCommandsFromChatInput) return;
1888 if (this_edit_mes_id) return; // don't proceed if editing a message
18881889
1889 let generateType;1890 let generateType;
1890 // "Continue on send" is activated when the user hits "send" (or presses enter) on an empty chat box, and the last1891 // "Continue on send" is activated when the user hits "send" (or presses enter) on an empty chat box, and the last
@@ -10002,6 +10003,8 @@ jQuery(async function () {
10002 }10003 }
1000310004
10004 else if (id == 'option_continue') {10005 else if (id == 'option_continue') {
10006 if (this_edit_mes_id) return; // don't proceed if editing a message
10007
10005 if (is_send_press == false || fromSlashCommand) {10008 if (is_send_press == false || fromSlashCommand) {
10006 is_send_press = true;10009 is_send_press = true;
10007 Generate('continue', buildOrFillAdditionalArgs());10010 Generate('continue', buildOrFillAdditionalArgs());