You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Touch scrolling a virtual list logs "Ignored attempt to cancel a touchmove event" and scrolls the page #393
Render a List with enough data to virtualize (e.g. height={200}, itemHeight={20}, 1000 items) on a page that is taller than the viewport, so the page can scroll too.
On a touch device (or Chrome DevTools with device emulation), start a swipe inside the list and scroll it.
Expected
The list scrolls and the page stays put.
No console warnings.
Actual
The page scrolls together with the list.
The console fills with warnings, one per touchmove:
[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.
Cause
In useMobileTouchMove, the only listener on the list when a touch begins is a passivetouchstart. The non-passive touchmove listener is added to e.target inside that touchstart handler.
Browsers decide whether a touch sequence can be cancelled by checking for non-passive touch listeners when the touch begins. That check runs before the touchstart handler adds its listener, so the browser treats the whole touch as non-blocking. Every touchmove then arrives with cancelable: false, and the preventDefault() call in onTouchMove is ignored, which is what logs the warning. The browser's native scroll is never stopped, so the page scrolls along with the list.
A second, smaller source of the same warning: after a swipe passes the list's top or bottom edge, the browser hands the scroll to the page (originScroll). From then on the moves can't be cancelled, but preventDefault() is still called on them if the swipe reverses.
Proposed fix
Register a touchmove listener with { passive: false } on the list element itself when the hook mounts, so the list area already counts as blocking when a touch begins. The real handler stays on e.target, because virtualized items can be removed mid-swipe and events from a removed target never bubble up to the list.
Only call e.preventDefault() when e.cancelable is true.
Hi! Thanks for the detailed root-cause analysis. I'd like to work on this. My plan is to register a non-passive touchmove listener ({ passive: false }) on the list container when the hook mounts, instead of adding it to e.target inside the passive touchstart handler. The browser would then see a cancelable listener when the touch begins, so preventDefault() works, the page stays put, and the intervention warnings go away. I'd keep the existing offset/inertia logic and add a test that simulates a touch scroll. Could you assign it to me?
Activity
Mittalnew commentedon Nov 16, 2026
Hi! Thanks for the detailed root-cause analysis. I'd like to work on this. My plan is to register a non-passive
touchmovelistener ({ passive: false }) on the list container when the hook mounts, instead of adding it toe.targetinside the passivetouchstarthandler. The browser would then see a cancelable listener when the touch begins, sopreventDefault()works, the page stays put, and the intervention warnings go away. I'd keep the existing offset/inertia logic and add a test that simulates a touch scroll. Could you assign it to me?Pareder commentedon Nov 16, 2026
@Mittalnew I've already created a PR #394.