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() {
18851885export async function sendTextareaMessage() {
18861886 if (is_send_press) return;
18871887 if (isExecutingCommandsFromChatInput) return;
1888+ if (this_edit_mes_id) return; // don't proceed if editing a message
18881889
18891890 let generateType;
18901891 // "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 () {
1000210003 }
1000310004
1000410005 else if (id == 'option_continue') {
10006+ if (this_edit_mes_id) return; // don't proceed if editing a message
10007+
1000510008 if (is_send_press == false || fromSlashCommand) {
1000610009 is_send_press = true;
1000710010 Generate('continue', buildOrFillAdditionalArgs());