mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-02 13:39:41 +02:00
fix: prevent mouse wheel from cycling plan mode options instead of scrolling
Claude's Ink UI enables terminal mouse reporting, causing xterm.js to forward wheel events to the application. This made scrolling up to read the plan impossible. Intercept wheel events to always scroll the terminal viewport directly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -466,6 +466,14 @@ class ClaudemanApp {
|
||||
this.terminal.open(container);
|
||||
this.fitAddon.fit();
|
||||
|
||||
// Always use mouse wheel for terminal scrollback, never forward to application.
|
||||
// Prevents Claude's Ink UI (plan mode selector) from capturing scroll as option navigation.
|
||||
this.terminal.attachCustomWheelEventHandler((ev) => {
|
||||
const lines = Math.round(ev.deltaY / 25) || (ev.deltaY > 0 ? 1 : -1);
|
||||
this.terminal.scrollLines(lines);
|
||||
return false;
|
||||
});
|
||||
|
||||
// Welcome message
|
||||
this.showWelcome();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user