Problem
TerminalScrollGestureHandler unconditionally wraps the child in InfiniteScrollView when the terminal is in alternate buffer mode. There is no way to opt out of this.
The simulateScroll parameter only controls whether arrow keys are sent as a fallback — the InfiniteScrollView wrapper is always inserted when isAltBuffer == true.
This makes it impossible to embed TerminalView inside an external scrollable container, because InfiniteScrollView consumes all scroll gestures. A concrete use case: on mobile, when the on-screen keyboard opens, the app may want to keep the terminal at its full size (using autoResize: false) and let the user scroll the terminal widget itself within the reduced visible area. Currently this can't work because xterm's internal scroll handling eats the gestures.
Proposal
Add a parameter to TerminalView (e.g. handleScrollInAlternateBuffer, defaulting to true) that controls whether TerminalScrollGestureHandler wraps the child in InfiniteScrollView when in alt buffer mode. When false, scroll gestures pass through to the parent, and the app takes responsibility for scroll behavior.
Problem
TerminalScrollGestureHandlerunconditionally wraps the child inInfiniteScrollViewwhen the terminal is in alternate buffer mode. There is no way to opt out of this.The
simulateScrollparameter only controls whether arrow keys are sent as a fallback — theInfiniteScrollViewwrapper is always inserted whenisAltBuffer == true.This makes it impossible to embed
TerminalViewinside an external scrollable container, becauseInfiniteScrollViewconsumes all scroll gestures. A concrete use case: on mobile, when the on-screen keyboard opens, the app may want to keep the terminal at its full size (usingautoResize: false) and let the user scroll the terminal widget itself within the reduced visible area. Currently this can't work because xterm's internal scroll handling eats the gestures.Proposal
Add a parameter to
TerminalView(e.g.handleScrollInAlternateBuffer, defaulting totrue) that controls whetherTerminalScrollGestureHandlerwraps the child inInfiniteScrollViewwhen in alt buffer mode. Whenfalse, scroll gestures pass through to the parent, and the app takes responsibility for scroll behavior.