Egregiously overengineered fix for a niche UI bug (#5074)

Fixes #4714
This commit is contained in:
Jeremy Rifkin
2023-05-30 22:11:21 -04:00
committed by GitHub
parent 800692309b
commit 0bc22f8883
2 changed files with 17 additions and 0 deletions

View File

@@ -724,6 +724,17 @@ function start() {
sizeRoot();
// This is an attempt to deal with #4714. Some sort of weird behavior causing .lm_tabs container to not be properly
// sized and the tab to overflow. Though the tabs do, at least briefly, fit fine. Overflow is hidden in css and this
// is needed to get golden layout to realize overflow is happening and show the button to see hidden tabs. I can't
// find any way to detect when all panes / monaco editors have initialized / settled so this is probably overkill
// but just do the size recomputation a few times while loading.
for (let delay = 250; delay <= 1000; delay += 250) {
window.setTimeout(() => {
sizeRoot();
}, delay);
}
History.trackHistory(layout);
new Sharing(layout);
}

View File

@@ -1296,3 +1296,9 @@ html[data-theme='pink'] {
max-height: calc(100vh - 50px);
overflow: scroll;
}
// This is part of a fix for #4714
.lm_tabs {
overflow: hidden;
max-height: 100%;
}