Update MobileNav.svelte
Browse files
src/lib/components/MobileNav.svelte
CHANGED
|
@@ -90,6 +90,9 @@
|
|
| 90 |
const tween = Spring.of(() => springTarget, { stiffness: 0.2, damping: 0.8 });
|
| 91 |
|
| 92 |
function onTouchStart(e: TouchEvent) {
|
|
|
|
|
|
|
|
|
|
| 93 |
const touch = e.changedTouches[0];
|
| 94 |
touchstart = touch;
|
| 95 |
dragStartTime = Date.now();
|
|
|
|
| 90 |
const tween = Spring.of(() => springTarget, { stiffness: 0.2, damping: 0.8 });
|
| 91 |
|
| 92 |
function onTouchStart(e: TouchEvent) {
|
| 93 |
+
// Ignore touch events when a modal is open (app is inert)
|
| 94 |
+
if (document.getElementById("app")?.hasAttribute("inert")) return;
|
| 95 |
+
|
| 96 |
const touch = e.changedTouches[0];
|
| 97 |
touchstart = touch;
|
| 98 |
dragStartTime = Date.now();
|