Commit 981b29d
authored
fix: use IsPrimary() for touch pointer isPrimary instead of hardcoded id (#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.)1 parent 3681722 commit 981b29d
2 files changed
Lines changed: 8 additions & 1 deletion
File tree
- change
- vnext/Microsoft.ReactNative/Fabric/Composition
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1385 | 1385 | | |
1386 | 1386 | | |
1387 | 1387 | | |
1388 | | - | |
| 1388 | + | |
1389 | 1389 | | |
1390 | 1390 | | |
1391 | 1391 | | |
| |||
0 commit comments