Skip to content

Let IgxTouchManager pointerDown veto a gesture to avoid blocking scroll - #17466

Open
ChronosSF with Copilot wants to merge 2 commits into
copilot/remove-hammerjs-dependencyfrom
copilot/fix-comments-in-review-thread
Open

Let IgxTouchManager pointerDown veto a gesture to avoid blocking scroll#17466
ChronosSF with Copilot wants to merge 2 commits into
copilot/remove-hammerjs-dependencyfrom
copilot/fix-comments-in-review-thread

Conversation

Copilot AI commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

IgxTouchManager starts tracking on every accepted pointerdown and, via its non-passive touchmove listener, calls preventDefault() while tracking. When attached to document (e.g. Navigation Drawer), this cancels normal page scrolling even when the consumer would ignore the gesture. Addresses the review comments in pullrequestreview-4787557464.

Changes

  • core/src/core/touch.ts

    • pointerDown callback signature is now (event: IgxGestureEvent) => boolean | void.
    • When pointerDown returns false, the manager stops tracking immediately via a new _stopTracking() helper — resets _tracking/_panStarted/_pointerId/_startTarget and best-effort releases pointer capture — so touchmove no longer suppresses scrolling for vetoed gestures.
  • navigation-drawer/.../navigation-drawer.component.ts

    • panStart (wired as the drawer's pointerDown) now returns boolean: true when a pan is accepted (drawer open, or touch starts within maxEdgeZone), false otherwise (gestures disabled, pinned, non-touch, or touch outside the edge zone), letting the manager bail out and leave scrolling intact.
// touch.ts
if (this.callbacks.pointerDown?.(this._createEvent(event)) === false) {
    this._stopTracking(event.pointerId);
}

Returning nothing preserves the previous behavior, so other consumers are unaffected.

Copilot AI changed the title [WIP] Fix code based on review comments Let IgxTouchManager pointerDown veto a gesture to avoid blocking scroll Jul 27, 2026
Copilot AI requested a review from ChronosSF July 27, 2026 14:50
@ChronosSF
ChronosSF marked this pull request as ready for review July 27, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants