mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 06:42:03 +00:00
Remove auto-resize functionality and simplify input field layout
- Remove autoResize() function and calls - Set input field height to 100% instead of dynamic resizing - Adjust input padding from var(--size-2-1) to var(--size-2-2) - Remove explicit height: 100% from edit-mode and submit buttons
This commit is contained in:
parent
cf9d65232f
commit
071514f02a
1 changed files with 2 additions and 14 deletions
|
|
@ -107,7 +107,6 @@
|
|||
|
||||
textareaElement.textContent = "";
|
||||
userRequest = "";
|
||||
autoResize();
|
||||
|
||||
await chatService.submit(conversation, editModeActive, currentRequest, {
|
||||
onSubmit: () => {
|
||||
|
|
@ -146,16 +145,6 @@
|
|||
if (userRequest.trim() === "") {
|
||||
textareaElement.textContent = "";
|
||||
}
|
||||
autoResize();
|
||||
}
|
||||
}
|
||||
|
||||
function autoResize() {
|
||||
if (textareaElement) {
|
||||
// For contenteditable divs, reset height and set to scrollHeight
|
||||
textareaElement.style.height = "auto";
|
||||
const newHeight = Math.min(textareaElement.scrollHeight, window.innerHeight * 0.3);
|
||||
textareaElement.style.height = `${newHeight}px`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -276,13 +265,14 @@
|
|||
#input-field {
|
||||
grid-row: 2;
|
||||
grid-column: 2;
|
||||
height: 100%;
|
||||
max-height: 30vh;
|
||||
border-radius: var(--input-radius);
|
||||
font-weight: var(--input-font-weight);
|
||||
border-width: var(--input-border-width);
|
||||
border-style: solid;
|
||||
border-color: var(--background-modifier-border);
|
||||
padding: var(--size-2-1) var(--size-2-3);
|
||||
padding: var(--size-2-2) var(--size-2-3);
|
||||
background-color: var(--background-primary);
|
||||
font-family: var(--font-interface-theme);
|
||||
resize: none;
|
||||
|
|
@ -332,7 +322,6 @@
|
|||
#edit-mode-button {
|
||||
grid-row: 2;
|
||||
grid-column: 4;
|
||||
height: 100%;
|
||||
border-radius: var(--button-radius);
|
||||
align-self: end;
|
||||
transition-duration: 0.5s;
|
||||
|
|
@ -341,7 +330,6 @@
|
|||
#submit-button {
|
||||
grid-row: 2;
|
||||
grid-column: 6;
|
||||
height: 100%;
|
||||
border-radius: var(--button-radius);
|
||||
padding-left: var(--size-4-5);
|
||||
padding-right: var(--size-4-5);
|
||||
|
|
|
|||
Loading…
Reference in a new issue