From 2e9cf3ce8813c7ba7eec82f58561275fbaaddc39 Mon Sep 17 00:00:00 2001 From: Hemna Date: Tue, 9 Apr 2024 10:07:12 -0400 Subject: [PATCH] Fixed scrolling problem with new webchat sent msg The Webchat ui was failing to scroll properly upon sending a new message from a tab that had a lot of messages already. --- aprsd/web/chat/static/js/send-message.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aprsd/web/chat/static/js/send-message.js b/aprsd/web/chat/static/js/send-message.js index 87aa5ed..1e0fa58 100644 --- a/aprsd/web/chat/static/js/send-message.js +++ b/aprsd/web/chat/static/js/send-message.js @@ -413,7 +413,6 @@ function append_message(callsign, msg, msg_html) { } // Find the right div to place the html - new_callsign = add_callsign(callsign, msg); update_callsign_path(callsign, msg); append_message_html(callsign, msg_html, new_callsign); @@ -502,7 +501,7 @@ function sent_msg(msg) { msg_html = create_message_html(d, t, msg['from_call'], msg['to_call'], msg['message_text'], ack_id, msg, false); append_message(msg['to_call'], msg, msg_html); save_data(); - scroll_main_content(msg['from_call']); + scroll_main_content(msg['to_call']); } function from_msg(msg) {