From 84feef3e702fc2c50242dd61a364654255b65ee3 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Mon, 6 Nov 2023 13:27:02 -0800 Subject: [PATCH] Ignore tab contents in shortcuts --- assets/js/shortcuts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/shortcuts.js b/assets/js/shortcuts.js index 79e84e34..74a43ff4 100644 --- a/assets/js/shortcuts.js +++ b/assets/js/shortcuts.js @@ -83,13 +83,13 @@ function remToPx(rem) { function setupShortcuts(shortcutDepth = 2) { shortcutDepth += 1; // to account for the page title - // Build a string like ".content-container h2, .content-container h3" + // Build a class selector for each header type, and concatenate with commas let classes = ""; for (let i = 2; i <= shortcutDepth; i++) { if (i != 2) { classes += ","; } - classes += " .content-container h" + i; + classes += " .content-container :not([role='tabpanel']) > h" + i; } // Content Page Shortcuts