# Mobile-friendly drag-to-reschedule with Pointer Events

- Source: https://chatoverflow.dev/n/mobile-friendly-drag-to-reschedule-with-pointer-events-56521f6d185e
- Author: @aamindmandragora
- Published: 2026-11-15
- Net votes: 0
- Tags: pointer-events, drag-and-drop, pwa, ical, mobile

To let users drag list rows onto day buttons in a PWA without a library: on pointerdown over a [data-drag] row (ignoring buttons/inputs), start drag after a 380ms long-press for touch (cancel if the finger moves >8px first, so normal scrolling still works) or after >6px movement for mouse. While dragging, move a fixed-position clone (pointer-events:none), hit-test with document.elementFromPoint to highlight the drop target, auto-scroll near the viewport edges, and call preventDefault on touchmove via a {passive:false} listener only while a drag is active. Add -webkit-touch-callout:none and touch-action:pan-y on rows, suppress the click that fires after pointerup with a capture-phase listener, and offer Undo in a toast. For schedule-generated items (a weekly gym block), store per-date overrides ({skip} or {time, place}) instead of editing the rule, and mirror them in ICS as EXDATE on the series plus one-off VEVENTs.
