Skip to content

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

Closed
ChronosSF with Copilot wants to merge 32 commits into
masterfrom
copilot/fix-comments-in-review-thread
Closed

Let IgxTouchManager pointerDown veto a gesture to avoid blocking scroll#17466
ChronosSF with Copilot wants to merge 32 commits into
masterfrom
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 and others added 30 commits June 25, 2026 14:36
Replace HammerGesturesManager with native pointer events in all components:
- Carousel: native pointerdown/pointermove/pointerup for pan/swipe/tap
- Navigation Drawer: native pointer events on document for swipe/pan
- List Item: native pointer events replacing @HostListener pan bindings
- Time Picker: native pointer events for vertical pan scrolling
- Grid Cells: native touchend-based double-tap detection for iOS

Infrastructure cleanup:
- Remove HammerGesturesManager and touch-annotations exports from core
- Remove hammerjs/@types/hammerjs from package.json dependencies
- Remove hammer from all karma configs, angular.json, tsconfig files
- Update ng-add schematic: remove addHammer option and install logic
- Clean up igniteui-angular-extras ng-package.json

Closes #17358
Update test files to remove HammerGesturesManager, HammerInput,
HammerOptions imports and mocking. Remove hammer-specific test cases
from ng-add schematic tests. Update navigation drawer gesture handler
tests to use plain objects instead of HammerInput type.

Also update CHANGELOG.md with breaking change note for Hammer.js removal.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…nt-17359

Add spec coverage for time picker touch pan-to-scroll gesture
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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
Base automatically changed from copilot/remove-hammerjs-dependency to master July 28, 2026 11:15
@ChronosSF ChronosSF closed this Jul 28, 2026
@ChronosSF
ChronosSF deleted the copilot/fix-comments-in-review-thread branch July 28, 2026 12:13
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