1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-03-27 16:25:43 +02:00

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").
This commit is contained in:
michael-kerscher 2025-02-08 11:47:02 +01:00 committed by GitHub
parent f9aca3738a
commit cdfe3e7359
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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";
});