fix: prevent cumulative terminal shrinkage in fullscreen mode
When switching terminal sessions in fullscreen mode, the viewport shrank cumulatively because .terminal-wrapper uses grid-template-rows: auto 1fr. With showControls=false, the single child (.terminal-container) landed in the auto track instead of 1fr, creating a feedback loop with xterm fit(). - Add .terminal-wrapper.no-controls with grid-template-rows: 1fr so the container fills the wrapper when the header is hidden. - Apply no-controls class in TerminalComponent when showControls=false. - Replace setTimeout(50) with double requestAnimationFrame in TerminalPage for more reliable fit() timing after tab switches. Quality gates: tsc --noEmit (clean), pytest (208 passed, 6 pre-existing)
This commit is contained in:
@@ -2562,6 +2562,13 @@ a.nav-item,
|
||||
background: #1e1e1e;
|
||||
}
|
||||
|
||||
/* When controls are hidden (fullscreen), only the container is in flow;
|
||||
force it into the 1fr track so it fills the wrapper instead of landing
|
||||
in the auto track and shrinking on each fit(). */
|
||||
.terminal-wrapper.no-controls {
|
||||
grid-template-rows: 1fr;
|
||||
}
|
||||
|
||||
.terminal-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
Reference in New Issue
Block a user