Skip to content

Commit

Permalink
fix: hide all sticky-widget when open split windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ythyayat committed Feb 22, 2025
1 parent b7f16f9 commit cc7c58f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions vscode-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ document.addEventListener('DOMContentLoaded', function() {
targetDiv.appendChild(newElement);

// Hide the sticky widget
const widget = document.querySelector(".sticky-widget");
widget && (widget.style.opacity = 0);
const widgets = document.querySelectorAll(".sticky-widget");
widgets.forEach((widget) => {
widget.style.opacity = 0;
});

// Hide the tree sticky widget
const treeWidget = document.querySelector(".monaco-tree-sticky-container");
Expand All @@ -81,8 +83,10 @@ document.addEventListener('DOMContentLoaded', function() {
element && element.click();

// Show the sticky widget
const widget = document.querySelector(".sticky-widget");
widget && (widget.style.opacity = 1);
const widgets = document.querySelectorAll(".sticky-widget");
widgets.forEach((widget) => {
widget.style.opacity = 1;
});

// Show the tree sticky widget
const treeWidget = document.querySelector(".monaco-tree-sticky-container");
Expand Down

0 comments on commit cc7c58f

Please sign in to comment.