Skip to content

Commit b98e042

Browse files
author
Ivan Efimov
authored
Merge pull request #2903 from limonspb/cli_height_fix
Cli tab: vertical flex fix and removing scroll bars
2 parents ef098e3 + f08fa0a commit b98e042

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/css/tabs/cli.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
}
44

55
.tab-cli .content_wrapper {
6-
height: calc(100% - 92px);
6+
flex-direction: column;
7+
display: flex;
8+
overflow-x: hidden;
9+
overflow-y: hidden;
710
}
811

912
.tab-cli p {
@@ -15,7 +18,7 @@
1518
border: 1px solid var(--subtleAccent);
1619
background-color: rgba(0, 0, 0, 0.75);
1720
margin-top: 0;
18-
height: calc(100% - 90px); /* - (p, textarea) */
21+
flex-grow: 1;
1922
background-image: url("../../images/light-wide-1.svg");
2023
background-repeat: no-repeat;
2124
background-position: 50% 80%;
@@ -71,6 +74,7 @@
7174

7275
.tab-cli .window .wrapper {
7376
white-space: pre-wrap;
77+
height: 0px;
7478
}
7579

7680
.tab-cli .window .error_message {

src/js/tabs/cli.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,9 @@ const lineFeedCode = 10;
363363
const carriageReturnCode = 13;
364364

365365
function writeToOutput(text) {
366-
const windowWrapper = TABS.cli.GUI.windowWrapper;
367-
windowWrapper.append(text);
368-
$('.tab-cli .window').scrollTop(windowWrapper.height());
366+
TABS.cli.GUI.windowWrapper.append(text);
367+
const cliWindow = $('.tab-cli .window');
368+
cliWindow.scrollTop(cliWindow.prop("scrollHeight"));
369369
}
370370

371371
function writeLineToOutput(text) {

0 commit comments

Comments
 (0)