Skip to content

fix(nav-drawer): preserve single-tap actions on iOS - #17473

Open
viktorkombov wants to merge 3 commits into
masterfrom
vkombov/fix-17472
Open

fix(nav-drawer): preserve single-tap actions on iOS#17473
viktorkombov wants to merge 3 commits into
masterfrom
vkombov/fix-17472

Conversation

@viktorkombov

Copy link
Copy Markdown
Contributor

Closes #17472

Description

Fixes an iOS regression where Navbar and icon-button actions could require two taps while Navigation Drawer gestures were enabled.

The Navigation Drawer now waits for meaningful horizontal movement before claiming the touch gesture and preventing native behavior. This preserves single-tap actions and vertical scrolling while keeping edge-swipe navigation working.

Implementation

The Navigation Drawer previously started tracking a pan immediately on pointerdown. Its document-level touchmove listener could consequently call preventDefault() for the small involuntary movement produced during a tap. On iOS, this can suppress the compatibility click, making actions appear to require two taps.

The fix separates gesture eligibility from gesture recognition:

  • pointerDown only checks whether the gesture is eligible, such as starting inside the drawer edge zone.
  • A pan starts only after at least 5px of primarily horizontal movement.
  • touchmove is prevented only after the pan has been recognized.
  • Taps and vertical movement retain their native browser behavior.

Testing

  • Added touch-manager gesture arbitration tests.
  • Added a Navigation Drawer tap regression test.
  • Verified the focused test suite passes.

Type of Change (check all that apply):

  • Bug fix
  • New functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog
  • Skills/Agents

Component(s) / Area(s) Affected:

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Test Configuration:

  • Angular version:
  • Browser(s):
  • OS:

Screenshots / Recordings

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes an iOS interaction regression where IgxNavigationDrawerComponent document-level gesture handling could suppress the compatibility click on tap targets (e.g., Navbar/icon-button actions) inside the drawer edge zone, making them appear to require two taps.

Changes:

  • Updates IgxTouchManager to (a) allow pointerDown to veto tracking and (b) defer pan recognition and touchmove.preventDefault() until movement exceeds a configurable threshold and matches an axis.
  • Adjusts Navigation Drawer gesture wiring to qualify edge touches on pointerDown, then start panning only after ~5px primarily-horizontal movement.
  • Adds unit coverage for touch-manager gesture arbitration and a Navigation Drawer tap regression scenario.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
projects/igniteui-angular/navigation-drawer/src/navigation-drawer/navigation-drawer.component.ts Defers drawer pan start until a horizontal pan is recognized; adds pan axis/threshold configuration.
projects/igniteui-angular/navigation-drawer/src/navigation-drawer/navigation-drawer.component.spec.ts Adds regression test ensuring taps in the edge zone don’t start panning or get touchmove prevented.
projects/igniteui-angular/core/src/core/touch.ts Extends touch manager API to support pointerDown veto + pan axis/threshold gating and delays touchmove.preventDefault() until pan start.
projects/igniteui-angular/core/src/core/touch.spec.ts Adds unit tests validating pointerDown veto behavior and pan threshold/axis behavior.

Comment thread projects/igniteui-angular/core/src/core/touch.ts Outdated
Copilot AI review requested due to automatic review settings July 31, 2026 10:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 31, 2026 11:06
@viktorkombov viktorkombov added the ❌ status: awaiting-test PRs awaiting manual verification label Jul 31, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (1)

projects/igniteui-angular/core/src/core/touch.ts:296

  • panThreshold is currently checked against the Euclidean distance before applying panAxis. With panAxis: 'horizontal', a diagonal move like deltaX=4, deltaY=3 has distance=5 and will start a pan even though horizontal travel is < 5px. This can still allow small involuntary tap jitter to cross the threshold and reintroduce the iOS click-suppression regression the PR is addressing. Consider applying the threshold on the dominant axis when panAxis is constrained.
    private _canStartPan(event: IgxGestureEvent): boolean {
        if (event.distance < this._panThreshold) {
            return false;
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IgxNavigationDrawer gestures suppress Navbar actions inside the edge zone on iOS

3 participants