fix: xterm.js mobile touch scrolling via viewport CSS and stopPropagation
- Add full mobile viewport CSS: overflow-y scroll, -webkit-overflow-scrolling touch, overscroll-behavior-y contain, translate3d hardware accel, scroll-behavior smooth, touch-action pan-y - After term.open(), find .xterm-viewport and add passive touch listeners that call stopPropagation() (not preventDefault) — this lets the browser handle native touch scrolling while preventing xterm.js internal handlers from interfering - Based on xterm.js known issue #5489 and SCROLLING_FIX.md approach
This commit is contained in:
@@ -3716,6 +3716,11 @@ a.nav-item,
|
||||
/* Mobile: allow native vertical touch panning on xterm viewport */
|
||||
.terminal-wrapper.mobile .xterm .xterm-viewport {
|
||||
touch-action: pan-y;
|
||||
overflow-y: scroll !important;
|
||||
-webkit-overflow-scrolling: touch !important;
|
||||
overscroll-behavior-y: contain;
|
||||
transform: translate3d(0, 0, 0);
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
/* Special Keys Strip */
|
||||
|
||||
Reference in New Issue
Block a user