Skip to content

Commit cdafc17

Browse files
committed
theme: Fix TOC links broken after first click
1 parent 3e760fa commit cdafc17

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

assets/js/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import focus from '@alpinejs/focus';
88

99
var debug = 0 ? console.log.bind(console, '[index]') : function () {};
1010

11+
// Expose Alpine to window for access from other modules/scripts
12+
window.Alpine = Alpine;
13+
1114
// Set up and start Alpine.
1215
(function () {
1316
// Register AlpineJS plugins.

layouts/_partials/layouts/header/mobilemenu.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{{/* Mobile menu overlay and panel - only visible on small screens */}}
22
<div
33
x-show="$store.nav.mobileMenu.open"
4+
:class="$store.nav.mobileMenu.open ? 'pointer-events-auto' : 'pointer-events-none'"
45
x-transition:enter="transition-opacity ease-out duration-200"
56
x-transition:enter-start="opacity-0"
67
x-transition:enter-end="opacity-100"
@@ -15,6 +16,7 @@
1516
{{/* Mobile menu panel */}}
1617
<div
1718
x-show="$store.nav.mobileMenu.open"
19+
:class="$store.nav.mobileMenu.open ? 'pointer-events-auto' : 'pointer-events-none'"
1820
x-transition:enter="transition ease-out duration-200"
1921
x-transition:enter-start="translate-x-full"
2022
x-transition:enter-end="translate-x-0"

layouts/_partials/layouts/search/results.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div
2-
class="fixed inset-0 overflow-hidden z-20"
3-
:class="{'fixed': open}"
2+
class="fixed inset-0 overflow-hidden z-20 pointer-events-none"
3+
:class="open && 'pointer-events-auto'"
44
aria-label="Search docs"
55
role="dialog"
66
aria-modal="true"

0 commit comments

Comments
 (0)