react-native-macos/React
Vincent Riemer 546c4b4c6c Add isPrimary property implementation to the PointerEvent object
Summary:
Changelog: [iOS][Internal] - Add isPrimary property implementation to the PointerEvent object

This diff adds the `isPrimary` property to the PointerEvent object iOS implementation. In addition this adds a related change where we "reserve" the 0 touch identifier for mouse events and the 1 identifier for apple pencil events. This is an easy way to ensure that these pointers are always consistent no matter what happens. Since mouse & pencil pointers should always be considered the primary pointer, that allows us to focus the more advanced primary pointer differentiation purely on touch events.

The logic for this touch event primary pointer differentiation is essentially setting the first touch it recieves as a primary pointer, setting it on touch registration, and sets all subsequent touchs (while the first touch is down) as not the primary pointers. When that primary pointer is lifted, the class property keeping track of the primary pointer is reset and then the **next** pointer (secondary pointers which had already started before the previous primary pointer was lifted are not "upgraded" to primary) is marked as primary. A new platform test is also included in this diff in order to verify the aforementioned behavior.

Reviewed By: lunaleaps

Differential Revision: D37961707

fbshipit-source-id: ae8b78c5bfea6902fb73094fca1552e4e648ea44
2022-07-26 11:41:48 -07:00
..
AccessibilityResources/en.lproj VoiceOver reads Tab elements as "Tab Description" (#30689) 2021-01-15 11:09:01 -08:00
AppSetup Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
Base Added border curve style prop ("Squircle" effect - iOS only) (#33783) 2022-07-21 04:11:30 -07:00
CoreModules Possible fix for convertIdToFollyDynamic crash in RCTBaseTextInputView and RCTEventDispatcher 2022-07-25 18:14:46 -07:00
CxxBridge Daily `arc lint --take CLANGFORMAT` 2022-06-13 02:39:39 -07:00
CxxLogUtils Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
CxxModule Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
CxxUtils Fix crash in folly object conversion 2022-05-25 03:29:17 -07:00
DevSupport Back out "fixed SDK issue while uploading app in debug scheme" 2022-06-21 10:48:14 -07:00
FBReactNativeSpec bump RTC-Folly to 2021.07.22 (#33841) 2022-06-21 12:36:43 -07:00
Fabric Add isPrimary property implementation to the PointerEvent object 2022-07-26 11:41:48 -07:00
Inspector Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
Modules Minor: Rename RCTNotAllowedInAppWideFabric to RCTNotAllowedInFabricWithoutLegacy 2022-07-08 15:07:55 -07:00
Profiler Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
Tests Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
UIUtils Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
Views Remove MaskedViewIOS from react-native-github 2022-07-22 17:07:26 -07:00
React-RCTFabric.podspec bump RTC-Folly to 2021.07.22 (#33841) 2022-06-21 12:36:43 -07:00
third-party.xcconfig bump RTC-Folly to 2021.07.22 (#33841) 2022-06-21 12:36:43 -07:00