Skip to content

[0.84] fix: use IsPrimary() for touch pointer isPrimary instead of hardcoded id#16121

Merged
acoates-ms merged 2 commits into
microsoft:0.84-stablefrom
Virtual-Fulfillment-Technologies-Inc:vendora/cherry-16099
May 12, 2026
Merged

[0.84] fix: use IsPrimary() for touch pointer isPrimary instead of hardcoded id#16121
acoates-ms merged 2 commits into
microsoft:0.84-stablefrom
Virtual-Fulfillment-Technologies-Inc:vendora/cherry-16099

Conversation

@gmacmaster
Copy link
Copy Markdown
Contributor

@gmacmaster gmacmaster commented May 11, 2026

port over #16099

Microsoft Reviewers: Open in CodeFlow

… id (microsoft#16099)

* Create react-native-windows-4ad3ddaf-1358-4ff0-9971-38a7db68266c.json

* fix: use IsPrimary() for touch pointer isPrimary instead of hardcoded ID check (#4)

activeTouch.isPrimary was set via `pointerId == 1`, which only works for
  mouse (MOUSE_POINTER_ID == 1). Windows touch pointer IDs are OS-allocated
  and essentially never 1, so isPrimary was always false for touch input.
  This meant touch pointers never triggered onClick (gated behind
  isPrimary && button == 0) and reported incorrect isPrimary in
  PointerEvents sent to JS.

  Replace with pointerPoint.Properties().IsPrimary(), which reads the OS
  POINTER_FLAG_PRIMARY flag directly. This API is already used elsewhere
  in the codebase (SwitchComponentView, WindowsTextInputComponentView,
  Composition.Input).

  (The diagnostics are pre-existing clang noise from missing PCH/Windows headers — not
  related to this change.)
@gmacmaster gmacmaster requested a review from a team as a code owner May 11, 2026 23:43
@acoates-ms
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@acoates-ms
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@acoates-ms acoates-ms enabled auto-merge (squash) May 12, 2026 17:04
@acoates-ms acoates-ms merged commit fcfb1be into microsoft:0.84-stable May 12, 2026
38 checks passed
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