Cli tab: vertical flex fix and removing scroll bars

10.8-maintenance
Ivan Efimov 2022-04-22 17:51:40 -05:00
parent c86348b4db
commit f08fa0a743
2 changed files with 9 additions and 5 deletions

View File

@ -3,7 +3,10 @@
}
.tab-cli .content_wrapper {
height: calc(100% - 92px);
flex-direction: column;
display: flex;
overflow-x: hidden;
overflow-y: hidden;
}
.tab-cli p {
@ -15,7 +18,7 @@
border: 1px solid var(--subtleAccent);
background-color: rgba(0, 0, 0, 0.75);
margin-top: 0;
height: calc(100% - 90px); /* - (p, textarea) */
flex-grow: 1;
background-image: url("../../images/light-wide-1.svg");
background-repeat: no-repeat;
background-position: 50% 80%;
@ -71,6 +74,7 @@
.tab-cli .window .wrapper {
white-space: pre-wrap;
height: 0px;
}
.tab-cli .window .error_message {

View File

@ -363,9 +363,9 @@ const lineFeedCode = 10;
const carriageReturnCode = 13;
function writeToOutput(text) {
const windowWrapper = TABS.cli.GUI.windowWrapper;
windowWrapper.append(text);
$('.tab-cli .window').scrollTop(windowWrapper.height());
TABS.cli.GUI.windowWrapper.append(text);
const cliWindow = $('.tab-cli .window');
cliWindow.scrollTop(cliWindow.prop("scrollHeight"));
}
function writeLineToOutput(text) {