Skip to content

Commit

Permalink
Refine sidebar hiding
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Jul 30, 2021
1 parent 3336d6b commit 6ba20b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/insipid_sphinx_theme/insipid/static/insipid-sidebar.js_t
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,13 @@ $(document).ready(function () {
}
}

$current.on('click', 'a', function () {
$current.on('click', '> a', function () {
if ($overlay.css('position') === 'fixed') {
hideSidebar();
}
})

if ($current.length == 1 && $overlay.css('position') === 'fixed') {
if ($current.length == 1 && $current[0].childElementCount == 1 && $overlay.css('position') === 'fixed') {
hideSidebar();
}
});
Expand Down

0 comments on commit 6ba20b1

Please sign in to comment.