File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
src/pydata_sphinx_theme/assets/scripts Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -1049,6 +1049,10 @@ function setupArticleTocSyncing() {
10491049 // the change event (because it's the same hash), but we still want to re-sync
10501050 // the table of contents.
10511051 window . addEventListener ( "click" , ( event ) => {
1052+ // Match any link because an in-page ("hash link") can occur anywhere on the
1053+ // page (e.g., one section of the page linking to another section of the
1054+ // page, also each of the headings contains a link to itself), not just in
1055+ // the side table of contents.
10521056 if ( event . target . closest ( "a" ) ) {
10531057 // Defer the sync operation because window.location.hash does not change
10541058 // until after the default action (i.e., the link click) for the event has
You can’t perform that action at this time.
0 commit comments