fix: prevent swipe navigation when scrolling someday area

Ignore horizontal swipe gestures that originate inside the .weekly-someday
element so that horizontal scrolling of someday lists works without
triggering day navigation on mobile.

v1.35.1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
mARTin 2026-03-15 09:53:54 +01:00
parent e663f82c26
commit 914b1d76b2
2 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "my-weekly-todo-list",
"version": "1.35.0",
"version": "1.35.1",
"description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view",
"main": "index.js",
"scripts": {

View File

@ -3518,12 +3518,17 @@ export default function WeeklyView() {
let touchEndX = 0;
let touchEndY = 0;
let touchStartedInSomeday = false;
const handleTouchStart = (e: TouchEvent) => {
touchStartX = e.changedTouches[0].screenX;
touchStartY = e.changedTouches[0].screenY;
// Check if touch started inside the someday area (which has its own horizontal scroll)
touchStartedInSomeday = !!(e.target as HTMLElement)?.closest?.('.weekly-someday');
};
const handleTouchEnd = (e: TouchEvent) => {
if (touchStartedInSomeday) return; // Don't hijack someday horizontal scrolling
touchEndX = e.changedTouches[0].screenX;
touchEndY = e.changedTouches[0].screenY;
const diffX = touchEndX - touchStartX;