From cdfe3e7359dc4e56ebd4b6853fb22d58584dd46e Mon Sep 17 00:00:00 2001 From: michael-kerscher Date: Sat, 8 Feb 2025 11:47:02 +0100 Subject: [PATCH] Fix bug in speaker notes that broke navigating to next slide (#2634) Change this selector to use the ~= selector to test if a white space separated word "prev" or "next" is contained Fixes a speaker notes bug that did not allow going to the next slide in the speaker notes. The reason for that is that the "rel" attribute contained "prev" respective "next prefetch". See: https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors#attrvalue_2 This fixes part of #2004 when going to the right (containing "prefetch"). --- theme/speaker-notes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme/speaker-notes.js b/theme/speaker-notes.js index 6247ea3ffa28..b155b0a90d52 100644 --- a/theme/speaker-notes.js +++ b/theme/speaker-notes.js @@ -189,7 +189,7 @@ // Update prev/next buttons to keep speaker note state. document - .querySelectorAll('a[rel="prev"], a[rel="next"]') + .querySelectorAll('a[rel~="prev"], a[rel~="next"]') .forEach((elem) => { elem.href += "#speaker-notes-open"; });