File: sidebar-event-handler.patch

package info (click to toggle)
sphinx-rtd-theme 3.0.2%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,752 kB
  • sloc: python: 349; javascript: 348; makefile: 64; sh: 6
file content (23 lines) | stat: -rw-r--r-- 862 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: James Addison <jay@jp-hosting.net>
Date: Sat, 18 Jan 2025 20:34:48 +0300
Subject: Attach sidebar-close handler to current-page links

Bug-Debian: http://bugs.debian.org/1075914
Forwarded: https://github.com/readthedocs/sphinx_rtd_theme/pull/1588
---
 src/theme.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/theme.js b/src/theme.js
index db546b4..106c7a0 100644
--- a/src/theme.js
+++ b/src/theme.js
@@ -86,7 +86,7 @@ function ThemeNav () {
             })
 
             // Nav menu link click operations
-            .on('click', ".wy-menu-vertical .current ul li a", function() {
+            .on('click', ".wy-menu-vertical ul li a[href^='#']", function() {
                 var target = $(this);
                 // Close menu when you click a link.
                 $("[data-toggle='wy-nav-shift']").removeClass("shift");