From 36c29084bbe272cba5287a8e5200776d894f1328 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sat, 17 Feb 2024 20:08:11 -0800 Subject: [PATCH] UI: fix instruct style background for multiline inputs --- js/main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index fd35e9e1..d5cb2221 100644 --- a/js/main.js +++ b/js/main.js @@ -390,7 +390,12 @@ function updateCssProperties() { if (chatContainer.clientHeight > 0) { // Calculate new chat height and adjust CSS properties - const newChatHeight = `${chatContainer.clientHeight - chatInputHeight + 40}px`; + var numericHeight = chatContainer.parentNode.clientHeight - chatInputHeight + 40 - 100; + if (document.getElementById("chat-tab").style.paddingBottom != "") { + numericHeight += 20; + } + const newChatHeight = `${numericHeight}px`; + document.documentElement.style.setProperty("--chat-height", newChatHeight); document.documentElement.style.setProperty("--input-delta", `${chatInputHeight - 40}px`);