Skip to content

Commit

Permalink
Add toc handler on interactive readyState
Browse files Browse the repository at this point in the history
  • Loading branch information
andmor- committed Dec 15, 2023
1 parent 712419c commit cbfda05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(($, Drupal) => {
Drupal.behaviors.clarin_theme_toc = {
attach: function attach(context) {
if (context === document && document.readyState !== "loading") {
if (context === document && document.readyState === "interactive") {
$(function initToc() {
const navSelector = "#toc";
const scopeSelector = "#tocscope";
Expand Down

0 comments on commit cbfda05

Please sign in to comment.