Commit ·
3853de2
1
Parent(s): fc2a1d1
Remove mobile-scroll-fix.js that was blocking scroll on mobile
Browse files- index.html +0 -1
- static/js/mobile-scroll-fix.js +0 -25
index.html
CHANGED
|
@@ -380,7 +380,6 @@
|
|
| 380 |
|
| 381 |
</main>
|
| 382 |
|
| 383 |
-
<script src="/static/js/mobile-scroll-fix.js"></script>
|
| 384 |
<script src="/static/js/script.js"></script>
|
| 385 |
</body>
|
| 386 |
</html>
|
|
|
|
| 380 |
|
| 381 |
</main>
|
| 382 |
|
|
|
|
| 383 |
<script src="/static/js/script.js"></script>
|
| 384 |
</body>
|
| 385 |
</html>
|
static/js/mobile-scroll-fix.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
| 1 |
-
// FIX ULTIME SCROLL MOBILE
|
| 2 |
-
(function() {
|
| 3 |
-
if (window.innerWidth <= 768) {
|
| 4 |
-
// Désactiver le smooth scroll
|
| 5 |
-
document.documentElement.style.scrollBehavior = 'auto';
|
| 6 |
-
document.body.style.scrollBehavior = 'auto';
|
| 7 |
-
|
| 8 |
-
// Bloquer tous les preventDefault sur scroll
|
| 9 |
-
let supportsPassive = false;
|
| 10 |
-
try {
|
| 11 |
-
window.addEventListener("test", null, Object.defineProperty({}, 'passive', {
|
| 12 |
-
get: function () { supportsPassive = true; }
|
| 13 |
-
}));
|
| 14 |
-
} catch(e) {}
|
| 15 |
-
|
| 16 |
-
const wheelOpt = supportsPassive ? { passive: true } : false;
|
| 17 |
-
|
| 18 |
-
// Supprimer tous les event listeners qui peuvent bloquer le scroll
|
| 19 |
-
window.removeEventListener('wheel', null);
|
| 20 |
-
window.removeEventListener('touchmove', null);
|
| 21 |
-
window.removeEventListener('scroll', null);
|
| 22 |
-
|
| 23 |
-
console.log('Mobile scroll fix applied');
|
| 24 |
-
}
|
| 25 |
-
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|