fix(terminal): keep wheel scrolling inside terminal panes - #792
Open
Juliusolsson05 wants to merge 4 commits into
Open
fix(terminal): keep wheel scrolling inside terminal panes#792Juliusolsson05 wants to merge 4 commits into
Juliusolsson05 wants to merge 4 commits into
Conversation
Let xterm consume normal scrollback and provider mouse input before canceling only unhandled vertical defaults on the host. This prevents inline terminal gestures from moving their surrounding panel without adding PTY, repaint, or React work. Preserve modified and horizontal gestures and dispose ownership on every host teardown. Refs #791
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
At a scrollback boundary, xterm leaves the wheel event unconsumed and Chromium scrolls the surrounding native panel. This makes the inline terminal jump within DebugPanel. This is separate from the GPU glyph corruption repaired in #790.
Change
Attach a disposable bubbling wheel boundary to shell, agent, and inline-debug terminal hosts. Xterm gets first refusal for normal scrollback, alternate-screen arrows, and mouse reporting. Only an otherwise-unconsumed, unmodified vertical gesture has its browser default canceled. Horizontal/modifier gestures and application engagement propagation are preserved. No synthetic PTY input, viewport movement, React updates, or repaint loop is added.
Verification
node scripts/smoke-terminal-wheel.mjspasses;--controlreproduces the original 120px parent-panel movement. Patched parent stays at 0px.Limits
This repairs the reproduced nested-scroll boundary leak; it does not claim to explain every reported scrolling symptom or change provider-specific alternate-screen behavior. The real-browser probe is opt-in because DOM test environments cannot exercise native default scrolling. The running application has not been restarted or changed by the probe.
Fixes #791