[0.84] fix: use IsPrimary() for touch pointer isPrimary instead of hardcoded id#16121
Merged
acoates-ms merged 2 commits intoMay 12, 2026
Conversation
… 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.)
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 1 pipeline(s). |
acoates-ms
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
port over #16099
Microsoft Reviewers: Open in CodeFlow