fix: prevent question custom input from hiding submit button#24107
fix: prevent question custom input from hiding submit button#24107chx9 wants to merge 2 commits intoanomalyco:devfrom
Conversation
The textarea used for typing a custom answer had no max-height and used overflow:hidden, causing it to grow unboundedly and push the submit button outside the visible area. Set max-height: 120px and overflow-y: auto so content scrolls inside the textarea instead of expanding the dialog. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
resizeInput was setting el.style.height to scrollHeight with no upper bound. Align the JS cap (120px) with the CSS max-height so the element height is consistent regardless of which constraint applies first. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: One potentially related PR was found:
|
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |


Issue for this PR
Closes #24109
Type of change
What does this PR do?
In web/serve mode, when the AI uses the
questiontool and the user clicks "Type your own answer", the textarea had no height limit.resizeInput()was settingel.style.height = el.scrollHeightwith no cap, and the CSS usedoverflow: hiddenwhich causes the element to expand rather than scroll internally. With enough text, the footer containing the Submit/Next/Dismiss buttons gets pushed out of the viewport entirely.Fix: set
max-height: 120pxandoverflow-y: autoon the textarea in CSS so it scrolls internally once it reaches ~6 lines. The JSresizeInputis updated toMath.min(el.scrollHeight, 120)to stay consistent with the CSS constraint.How did you verify your code works?
Ran the backend (
bun run --conditions=browser ./src/index.ts serve --port 4097) and app dev server (VITE_OPENCODE_SERVER_PORT=4097 bun dev -- --port 4444) locally. Triggered a question with options, selected "Type your own answer", pasted a large block of text, and confirmed the Submit button remains visible and clickable. Also verified the broken behavior exists without the fix by reverting and retesting.Screenshots / recordings
UI change — textarea now scrolls internally after ~6 lines, footer buttons always visible.
Checklist