Fix settings bug.. again.
This commit is contained in:
parent
f1ace2f821
commit
9ae1e5220f
2 changed files with 6 additions and 4 deletions
|
|
@ -47,13 +47,13 @@ const t = useTranslations(lang);
|
|||
<div id="current-content"></div>
|
||||
</div>
|
||||
<script is:inline>
|
||||
window.loadedContentStorage = {};
|
||||
window.currentlySelectedTab;
|
||||
function settingsLoad() {
|
||||
document.addEventListener("astro:after-swap", () => {
|
||||
window.currentlySelectedTab = "";
|
||||
document.removeEventListener("setting-tabChange", determineListener);
|
||||
});
|
||||
window.currentlySelectedTab;
|
||||
window.loadedContentStorage = {};
|
||||
Array.from(document.getElementsByClassName("setting-tab")).forEach((tab) => {
|
||||
let contentToLoad = document.getElementById("content-" + tab.id);
|
||||
if (contentToLoad) {
|
||||
|
|
@ -344,7 +344,10 @@ const t = useTranslations(lang);
|
|||
}
|
||||
}
|
||||
document.addEventListener('astro:after-swap', () => {
|
||||
settingsLoad()
|
||||
setTimeout(() => {
|
||||
settingsLoad();
|
||||
}, 300);
|
||||
|
||||
})
|
||||
settingsLoad()
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ const { title, optionalPreloads } = Astro.props;
|
|||
<ThemeLoader transition:persist />
|
||||
<CloakLoader transition:persist />
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="description" content="Astro description" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue