From ed68d60314e9013a970679e6ac8b0a5937b6b975 Mon Sep 17 00:00:00 2001 From: Matthias Rolke Date: Fri, 5 Jul 2024 09:32:36 +0200 Subject: [PATCH] fix: tabs didn't work in Safari --- site/index.html | 2 +- site/index.js | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/site/index.html b/site/index.html index 84a9f6e..842375b 100644 --- a/site/index.html +++ b/site/index.html @@ -198,7 +198,7 @@

FAQ

- + diff --git a/site/index.js b/site/index.js index f77fff2..6ac7265 100644 --- a/site/index.js +++ b/site/index.js @@ -190,14 +190,12 @@ function compareWithUndefined(a, b) { return a - b; } -window.addEventListener("DOMContentLoaded", () => { - document.querySelectorAll(".gridjs-search-input").forEach((input) => { - input.classList.add("slds-input"); - }); - const tabs = document.querySelectorAll('[role="tab"]'); - tabs.forEach((tab) => { - tab.addEventListener("click", changeTabs); - }); +document.querySelectorAll(".gridjs-search-input").forEach((input) => { + input.classList.add("slds-input"); +}); +const tabs = document.querySelectorAll('[role="tab"]'); +tabs.forEach((tab) => { + tab.addEventListener("click", changeTabs); }); try {