From e6b836f4b10b1c44dac00ba09ec57405558e4499 Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Mon, 28 Sep 2026 17:56:16 +0200 Subject: [PATCH] fix: cleanup when closing the chat while it is receiving a stream so we don't try to scroll a dead UI element Signed-off-by: Julien Veyssier --- src/components/ChattyLLM/ChattyLLMInputForm.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/ChattyLLM/ChattyLLMInputForm.vue b/src/components/ChattyLLM/ChattyLLMInputForm.vue index 51da553de..9062cf83b 100644 --- a/src/components/ChattyLLM/ChattyLLMInputForm.vue +++ b/src/components/ChattyLLM/ChattyLLMInputForm.vue @@ -487,6 +487,7 @@ export default { }, beforeUnmount() { + this.streamingMessage = null this.pollMessageGenerationCancel?.() cancelTaskPositionPolling() if (this.pollMessageGenerationTimerId) { @@ -633,7 +634,9 @@ export default { this.$nextTick(() => { const chatAreaElem = this.$refs.chatArea - chatAreaElem.scrollTop = chatAreaElem.scrollHeight + if (chatAreaElem) { + chatAreaElem.scrollTop = chatAreaElem.scrollHeight + } }) },