fix: prevent terminal from growing beyond viewport on resize
Added max-height constraints at multiple levels: - .mobile-terminal-wrapper: max-height 100vh/100dvh - .mobile-terminal-content: max-height 100%, min-height 0 - .terminal-container: max-height 100% - .xterm: max-height 100% - .xterm-viewport: max-height 100% + overflow-y auto This prevents xterm.js from expanding the container when fit() adds rows, which was causing an infinite growth loop on window resize.
This commit is contained in:
@@ -3071,6 +3071,8 @@ a.nav-item,
|
||||
"keys";
|
||||
height: 100vh;
|
||||
height: 100dvh; /* Dynamic viewport height for mobile */
|
||||
max-height: 100vh;
|
||||
max-height: 100dvh;
|
||||
background: #1e1e1e;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
@@ -3183,6 +3185,8 @@ a.nav-item,
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background: #1e1e1e;
|
||||
min-height: 0;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
/* Terminal wrapper - fills content area */
|
||||
@@ -3202,6 +3206,7 @@ a.nav-item,
|
||||
.terminal-wrapper.mobile .terminal-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
@@ -3211,6 +3216,7 @@ a.nav-item,
|
||||
.terminal-wrapper.mobile .terminal-container .xterm {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
@@ -3219,6 +3225,8 @@ a.nav-item,
|
||||
flex: 1;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
max-height: 100% !important;
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
|
||||
/* Special Keys Strip */
|
||||
|
||||
Reference in New Issue
Block a user