Skip to content

Agent Zero AI framework

fix: chat-input tremor during typing

Alessandroa0fc9367b7cd
diff --git a/webui/components/chat/input/chat-bar-input.html b/webui/components/chat/input/chat-bar-input.html
index 55a7d611b..f0210b2c2 100644
--- a/webui/components/chat/input/chat-bar-input.html
+++ b/webui/components/chat/input/chat-bar-input.html
@@ -86,7 +86,6 @@
font-size: 0.9rem;
max-height: clamp(7rem, 40vh, 20rem);
min-height: 3.05rem;
- field-sizing: content;
width: 100%;
padding: 0.48rem 40px var(--spacing-sm) var(--spacing-sm);
margin-right: var(--spacing-xs);
diff --git a/webui/components/chat/input/input-store.js b/webui/components/chat/input/input-store.js
index e0ceccc40..2e9e1f72a 100644
--- a/webui/components/chat/input/input-store.js
+++ b/webui/components/chat/input/input-store.js
@@ -67,6 +67,8 @@ const model = {
if (!this.message) chatInput.value = "";
chatInput.style.height = "auto";
chatInput.style.height = chatInput.scrollHeight + "px";
+ // pick up any layout shift triggered by the height assignment
+ chatInput.style.height = Math.max(chatInput.scrollHeight, parseInt(chatInput.style.height)) + "px";
}
},