From 9f657d39768da03180273dbb48e2af5424a29878 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sat, 14 Mar 2026 14:19:12 -0700 Subject: [PATCH] UI: Fix a minor glitch --- js/global_scope_js.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/global_scope_js.js b/js/global_scope_js.js index 425c2c59..084c98e8 100644 --- a/js/global_scope_js.js +++ b/js/global_scope_js.js @@ -287,7 +287,7 @@ function updateInstructPadding() { const messagesContainer = chatElement.querySelector(".messages"); const lastChild = messagesContainer?.lastElementChild; const prevSibling = lastChild?.previousElementSibling; - if (lastChild && prevSibling) { + if (lastChild && prevSibling && chatElement.offsetHeight > 0) { let bufferHeight = Math.max(0, Math.max(window.innerHeight - 128 - 84, window.innerHeight - prevSibling.offsetHeight - 84) - lastChild.offsetHeight); if (window.innerWidth <= 924) { bufferHeight = Math.max(0, bufferHeight - 32);