Fix: Chat scrollt nach Font-Loading nochmal nach unten
scrollDown() wartet jetzt auf document.fonts.ready und scrollt erneut. chat-page.js wartet nach loadHistory() zusätzlich per requestAnimationFrame auf den Repaint nach Font-Swap.
This commit is contained in:
1 parent
3cb468f4e8
commit
76341dc42b
14 files changed
+349
-121
No files matched your search
+14
-2
@@ -149,10 +149,22 @@ async function sendMessage() {
|
||||
|
||||
} catch (e) {
|
||||
endStreamBubble();
|
||||
// Prüfen ob Backend noch streamt (z.B. bei Netzwerkfehler)
|
||||
try {
|
||||
const status = await apiIsStreaming(getCurrentSessionId());
|
||||
if (status.streaming) {
|
||||
// Backend streamt noch weiter – Recovery-Poll starten
|
||||
setMetaHtml('<span>⏳ Streaming... (Verbindung wiederhergestellt)</span>');
|
||||
startStreamingPoll(getCurrentSessionId(), btn, status.chainId);
|
||||
return;
|
||||
}
|
||||
} catch (_) {}
|
||||
addErrorBubble('Netzwerk-Fehler: ' + e.message);
|
||||
} finally {
|
||||
btn.disabled = false;
|
||||
isStreaming = false;
|
||||
if (!isStreaming || !_streamingPollInterval) {
|
||||
btn.disabled = false;
|
||||
isStreaming = false;
|
||||
}
|
||||
endStreamBubble();
|
||||
|
||||
// Erst neue aus DB laden, dann gestreamte Elemente ersetzen
|
||||
|
||||
Reference in new issue
Block a user