Full document, spreadsheet, slideshow, and diagram tooling
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request 'fix(calendar): change mobile month navigation to vertical swipe' (#318) from fix/calendar-vertical-swipe into main

scott dfbcc1c9 309a3b3e

+5 -5
+4 -4
src/calendar/main.ts
··· 914 914 }, { passive: false }); 915 915 916 916 // --------------------------------------------------------------------------- 917 - // Touch swipe navigation — month view swipe left/right to change months 917 + // Touch swipe navigation — month view swipe up/down to change months 918 918 // --------------------------------------------------------------------------- 919 919 920 920 let touchStartX = 0; ··· 932 932 const dx = touch.clientX - touchStartX; 933 933 const dy = touch.clientY - touchStartY; 934 934 935 - // Only trigger if horizontal swipe is dominant and large enough 936 - if (Math.abs(dx) > 50 && Math.abs(dx) > Math.abs(dy) * 1.5) { 937 - if (dx < 0) navigateNext(); 935 + // Only trigger if vertical swipe is dominant and large enough 936 + if (Math.abs(dy) > 50 && Math.abs(dy) > Math.abs(dx) * 1.5) { 937 + if (dy < 0) navigateNext(); 938 938 else navigatePrev(); 939 939 } 940 940 }, { passive: true });
+1 -1
src/css/app.css
··· 9459 9459 grid-auto-rows: 1fr; 9460 9460 flex: 1; 9461 9461 overflow: hidden; 9462 - touch-action: pan-x; /* let horizontal swipes through, block vertical scroll */ 9462 + touch-action: pan-y; /* allow vertical touch gestures; we capture swipe at touchend */ 9463 9463 } 9464 9464 9465 9465 .cal-month-header {