Skip to content

Commit f2dc935

Browse files
committed
fix: button not appearing when cursor is already over sidebar on site load
1 parent e46aeca commit f2dc935

File tree

1 file changed

+6
-0
lines changed
  • src/extensionsIntegrated/CollapseFolders

1 file changed

+6
-0
lines changed

src/extensionsIntegrated/CollapseFolders/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ define(function (require, exports, module) {
8787
return;
8888
}
8989

90+
// we need this check to see if on site load the mouse is already over the sidebar area or not
91+
// because if it is, then we need to show the button
92+
if ($sidebar.is(":hover")) {
93+
$collapseBtn.addClass("show");
94+
}
95+
9096
$sidebar.on("mouseenter", function () {
9197
$collapseBtn.addClass("show");
9298
});

0 commit comments

Comments
 (0)