Skip to content

Commit 6fd5fd9

Browse files
arthurdennerCompuIves
authored andcommitted
fix(devtools): Fix terminal output when it's positioned along with the browser (codesandbox#2040)
1 parent 881f1cc commit 6fd5fd9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/app/src/app/components/Preview/DevTools/Terminal/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,10 @@ class TerminalComponent extends React.Component<Props, State> {
177177
const { height, hidden } = this.props;
178178

179179
return (
180-
<div className={!hidden && 'terminal'} ref={this.setupResizeObserver}>
180+
<div
181+
className={!hidden ? 'terminal' : undefined}
182+
ref={this.setupResizeObserver}
183+
>
181184
{!hidden && this.state.shells.length > 0 && (
182185
<ShellTabs
183186
selectedShell={this.state.selectedShell}
@@ -187,7 +190,7 @@ class TerminalComponent extends React.Component<Props, State> {
187190
/>
188191
)}
189192

190-
<div style={{ position: 'relative' }}>
193+
<div style={{ flex: 1, position: 'relative' }}>
191194
<div
192195
style={{
193196
position: 'absolute',

packages/app/src/app/components/Preview/DevTools/Terminal/styles.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,5 @@
162162
.terminal {
163163
height: 100%;
164164
width: 100%;
165+
display: flex;
165166
}

0 commit comments

Comments
 (0)