Skip to content

fix: prevent question custom input from hiding submit button#24107

Open
chx9 wants to merge 2 commits intoanomalyco:devfrom
chx9:fix/question-custom-input-overflow
Open

fix: prevent question custom input from hiding submit button#24107
chx9 wants to merge 2 commits intoanomalyco:devfrom
chx9:fix/question-custom-input-overflow

Conversation

@chx9
Copy link
Copy Markdown

@chx9 chx9 commented Apr 24, 2026

Issue for this PR

Closes #24109

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

In web/serve mode, when the AI uses the question tool and the user clicks "Type your own answer", the textarea had no height limit. resizeInput() was setting el.style.height = el.scrollHeight with no cap, and the CSS used overflow: hidden which 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: 120px and overflow-y: auto on the textarea in CSS so it scrolls internally once it reaches ~6 lines. The JS resizeInput is updated to Math.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

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

chx9 and others added 2 commits April 24, 2026 14:22
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>
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Apr 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

One potentially related PR was found:

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Apr 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@chx9
Copy link
Copy Markdown
Author

chx9 commented Apr 24, 2026

before fix, can't find the submit button:
718935ea-6ea9-4a24-940a-6dc20e191f58
after fix:
e30784f5-2e79-4bb5-ae14-62f5ad2302b9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: question custom answer textarea grows unboundedly, hiding submit button in web mode

1 participant