mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 15:10:19 +00:00
LibWebView: Prevent displaying two scroll bars in the inspector console
We currently display scroll bars for the JS console and its parent tab container. We want the console output to be separately scrollable from the tab content, but since both containers are scrollable, we end up with nested scroll bars. This also makes actually scrolling feel pretty awkward. Prevent this by making the tab container non-scrollable when the JS console is shown.
This commit is contained in:
parent
44e23dce77
commit
4795b9206c
Notes:
github-actions[bot]
2024-07-21 17:32:23 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/4795b9206cf Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/749
2 changed files with 10 additions and 1 deletions
|
@ -75,7 +75,7 @@ body {
|
|||
border-radius: 0.5rem;
|
||||
|
||||
margin-top: 30px;
|
||||
padding: 8px;
|
||||
padding: 8px 0px 0px 4px;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
|
|
|
@ -73,6 +73,15 @@ const selectTopTab = (tabButton, tabID) => {
|
|||
const selectBottomTab = (tabButton, tabID) => {
|
||||
selectedBottomTab = selectTab(tabButton, tabID, selectedBottomTab, selectedBottomTabButton);
|
||||
selectedBottomTabButton = tabButton;
|
||||
|
||||
let inspectorBottom = document.getElementById("inspector-bottom");
|
||||
inspectorBottom.scrollTo(0, 0);
|
||||
|
||||
if (tabID === "console") {
|
||||
inspectorBottom.style.overflow = "hidden";
|
||||
} else {
|
||||
inspectorBottom.style.overflow = "scroll";
|
||||
}
|
||||
};
|
||||
|
||||
let initialTopTabButton = document.getElementById("dom-tree-button");
|
||||
|
|
Loading…
Reference in a new issue