Skip to content

Commit

Permalink
fix: tabs didn't work in Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
amtrack committed Jul 5, 2024
1 parent 482d2f4 commit ed68d60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ <h2 class="slds-m-bottom_small">FAQ</h2>
</div>
</div>
</div>
<script type="module" src="./components/faq.js"></script>
<script src="components/faq.js"></script>
</div>
</div>
<script type="module" src="index.js"></script>
Expand Down
14 changes: 6 additions & 8 deletions site/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ed68d60

Please sign in to comment.