Skip to content

Conversation

@crisbeto
Copy link
Member

Fixes that the grid was running change detection on pointermove events even when the user isn't dragging to select cells.

Fixes #32700.

Fixes that the grid was running change detection on `pointermove` events even when the user isn't dragging to select cells.

Fixes angular#32700.
@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Jan 26, 2026
@pullapprove pullapprove bot requested review from tjshiu and wagnermaciel January 26, 2026 08:33
@angular-robot angular-robot bot added the area: performance Issues related to performance label Jan 26, 2026
@AdrianRomanski
Copy link

@crisbeto cool staff! I was reading the issue yesterday and trying to solve it in my head and your solution did not pop up :D
but now when im looking on it it makes 100% sense to fix it like that!
Noice

    // Since `pointermove` fires on each pixel, we need to
    // be careful not to hit the zone unless it's necessary.
    ngZone.runOutsideAngular(() => {
      this.element.addEventListener(
        'pointermove',
        event => {
          if (this._pattern.acceptsPointerMove()) {
            ngZone.run(() => this._pattern.onPointermove(event));
          }
        },
        {passive: true},
      );
    });

@adolgachev adolgachev self-requested a review January 26, 2026 17:07
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jan 27, 2026
@crisbeto crisbeto merged commit 0395ca2 into angular:main Jan 27, 2026
29 of 31 checks passed
@crisbeto
Copy link
Member Author

This PR was merged into the repository. The changes were merged into the following branches:

crisbeto added a commit that referenced this pull request Jan 27, 2026
Fixes that the grid was running change detection on `pointermove` events even when the user isn't dragging to select cells.

Fixes #32700.

(cherry picked from commit 0395ca2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: performance Issues related to performance target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(aria/grid): pointermove causes grid change detection although selection or dragging is disabled

3 participants