waitForFrame in scrollChatToBottom in sync scenarios #4791

24676882084c13b081f452d992f4ba6888a262ab

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -2Ignore whitespace
public/script.js+2 -2
@@ -1416,7 +1416,7 @@ export async function printMessages() {
14161416 chatElement.find('.mes').last().addClass('last_mes');
14171417 refreshSwipeButtons();
14181418 applyStylePins();
14191419 scrollChatToBottom({ waitForFrame: true });
14201420 delay(debounce_timeout.short).then(() => scrollOnMediaLoad());
14211421}
14221422
@@ -2532,7 +2532,7 @@ export function addOneMessage(mes, { type = 'normal', insertAfter = null, scroll
25322532
25332533 // Don't scroll if not inserting last
25342534 if (!insertAfter && !insertBefore && scroll) {
25352535 scrollChatToBottom({ waitForFrame: true });
25362536 }
25372537
25382538 applyCharacterTagsToMessageDivs({ mesIds: newMessageId });