🚨 FIX: Loading screen блокирует клики - принудительное удаление из DOM
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -10,11 +10,13 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
loadingScreen.style.opacity = '0';
|
loadingScreen.style.opacity = '0';
|
||||||
loadingScreen.style.pointerEvents = 'none';
|
loadingScreen.style.pointerEvents = 'none';
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loadingScreen.style.display = 'none';
|
// Полностью удаляем элемент из DOM
|
||||||
loadingScreen.remove(); // Полностью удаляем элемент
|
if (loadingScreen.parentNode) {
|
||||||
console.log('SmartSolTech: Loading screen removed');
|
loadingScreen.parentNode.removeChild(loadingScreen);
|
||||||
|
console.log('SmartSolTech: Loading screen completely removed from DOM');
|
||||||
|
}
|
||||||
}, 300);
|
}, 300);
|
||||||
}, 500); // Уменьшили время ожидания
|
}, 200); // Уменьшили время ожидания до 200ms
|
||||||
} else {
|
} else {
|
||||||
console.log('SmartSolTech: Loading screen not found');
|
console.log('SmartSolTech: Loading screen not found');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,10 +35,29 @@
|
|||||||
|
|
||||||
{% block extra_styles %}{% endblock %}
|
{% block extra_styles %}{% endblock %}
|
||||||
{% block extra_head %}{% endblock %}
|
{% block extra_head %}{% endblock %}
|
||||||
|
|
||||||
|
<!-- Emergency Loading Screen Script -->
|
||||||
|
<script>
|
||||||
|
// Emergency fallback - remove loading screen immediately if JS fails
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
setTimeout(function() {
|
||||||
|
const loadingScreen = document.getElementById('loading-screen');
|
||||||
|
if (loadingScreen) {
|
||||||
|
loadingScreen.style.opacity = '0';
|
||||||
|
loadingScreen.style.pointerEvents = 'none';
|
||||||
|
setTimeout(function() {
|
||||||
|
if (loadingScreen.parentNode) {
|
||||||
|
loadingScreen.parentNode.removeChild(loadingScreen);
|
||||||
|
}
|
||||||
|
}, 300);
|
||||||
|
}
|
||||||
|
}, 100); // Очень быстро убираем
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- Loading Screen -->
|
<!-- Loading Screen -->
|
||||||
<div id="loading-screen" class="position-fixed top-0 start-0 w-100 h-100 d-flex align-items-center justify-content-center" style="background: var(--bg-light); z-index: 9999;">
|
<div id="loading-screen" class="position-fixed top-0 start-0 w-100 h-100 d-flex align-items-center justify-content-center" style="background: var(--bg-light); z-index: 9999; transition: opacity 0.3s ease;">
|
||||||
<div class="loading-spinner"></div>
|
<div class="loading-spinner"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user