diff --git a/cortex/static/app.js b/cortex/static/app.js index 0ab4af2..5be09f7 100644 --- a/cortex/static/app.js +++ b/cortex/static/app.js @@ -151,7 +151,9 @@ inputEl.style.height = 'auto'; inputEl.style.maxHeight = maxHeight + 'px'; const sh = inputEl.scrollHeight; - inputEl.style.height = Math.min(sh, maxHeight) + 'px'; + // Minimum height is 1/3 of maxHeight so each setting is visually distinct + const minH = Math.round(maxHeight / 3); + inputEl.style.height = Math.max(Math.min(sh, maxHeight), minH) + 'px'; } function updateHeightUI() { @@ -169,13 +171,7 @@ maxHeight = HEIGHT_SIZES[nextIdx]; localStorage.setItem('maxHeight', maxHeight); updateHeightUI(); - if (!inputEl.value.trim()) { - inputEl.style.transition = 'height 0.2s ease'; - inputEl.style.height = maxHeight + 'px'; - setTimeout(syncHeight, 600); - } else { - syncHeight(); - } + syncHeight(); }); }