Skip to content
Snippets Groups Projects
Unverified Commit 94eb50d3 authored by Jonas Leder's avatar Jonas Leder
Browse files

disable scrolling while showing loading screen

parent 45b2aac9
No related branches found
No related tags found
No related merge requests found
......@@ -8,10 +8,12 @@ div.innerHTML = `<div class="loader-dots">
<div class="dots"></div>
</div>`;
document.body.classList.add("stop-scrolling");
document.body.appendChild(div);
document.addEventListener('readystatechange', event => {
if (event.target.readyState === "complete") {
document.querySelector(".loader").style.display = "none";
document.body.classList.remove("stop-scrolling");
}
});
\ No newline at end of file
......@@ -58,4 +58,9 @@
transform: translateX(100px);
opacity: 0;
}
}
.stop-scrolling {
height: 100%;
overflow: hidden;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment