Skip to content

Web UI: Capturing the up/down keys makes editing painful #13679

Closed

Description

@kentonv

Description

In the web UI, when I press "up" in the prompt box, it scrolls through the prompt history, like a shell would.

Annoyingly, this happens even if I've typed a long prompt, an my cursor is not on the first line of the prompt, and I'm pressing "up" in order to move the cursor to a previous line so that I can edit it. Instead, my whole prompt disappears, replaced with my previous prompt. I can press "down" to get back to what I typed, but this is quite jarring.

In the TUI, it seems that once you've started typing a new prompt, pressing "up" no longer scrolls through prompt history. Instead, it moves the cursor to the previous line as expected, and if you're already on the first line, it moves the cursor to the beginning of the line. This is how most text boxes in most UIs work. Good.

The web UI should match the TUI behavior.

Plugins

No response

OpenCode version

1.2.4

Steps to reproduce

  1. Open the web UI with opencode web
  2. Type and submit some prompt (so that the history contains something).
  3. Now type a long prompt that wraps across multiple lines, but don't submit it.
  4. Press "up"

Expected behavior: Cursor moves to previous line.
Actual behavior: Entire prompt disappears and is replaced by previous prompt.

Screenshot and/or share link

No response

Operating System

Linux

Terminal

Chrome (Web UI)

Activity

  1. added
    bug
    on Feb 15, 2026
  2. added
    web
    on Feb 15, 2026
  3. github-actions commented on Feb 15, 2026

    @github-actions
    Contributor

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

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

Metadata

Metadata

Assignees

Labels

bugweb

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions