Increase the maximum number of pointers tracked at the same time on iOS to 17 (#54248)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54248

Changelog: [IOS][FIXED] - Raised the maximum number of pointers tracked at the same time to 17

The current pool of pointer ids that can be used at the same time has the size of 11, while the maximum supported by some of the devices is 17 - https://developer.apple.com/forums/thread/17606.

To reproduce this problem use the iPad pro and place more than 11 pointers on the screen - the app becomes unresponsive due to [an infinite loop](https://github.com/facebook/react-native/blob/d93d32547bfadba731999ea251ca5e1d6c6c8912/packages/react-native/React/Fabric/Utils/RCTIdentifierPool.h#L22).

Reviewed By: cipolleschi

Differential Revision: D85345975

fbshipit-source-id: df6ba61f933406e7dc4e31382b35f002611fa433
This commit is contained in:
Jakub Piasecki authored and React Native Bot committed 2025-12-10 12:25:35 +00:00
1 parent ed81a8db2b
commit c4e88b7285
2 files changed
+2 -2

No files matched your search

@@ -437,7 +437,7 @@ struct PointerHasher {
* We hold the view weakly to prevent a retain cycle.
*/
__weak UIView *_rootComponentView;
RCTIdentifierPool<11> _identifierPool;
RCTIdentifierPool<17> _identifierPool;
UIHoverGestureRecognizer *_mouseHoverRecognizer API_AVAILABLE(ios(13.0));
UIHoverGestureRecognizer *_penHoverRecognizer API_AVAILABLE(ios(13.0));
@@ -137,7 +137,7 @@ struct PointerHasher {
* We hold the view weakly to prevent a retain cycle.
*/
__weak UIView *_rootComponentView;
RCTIdentifierPool<11> _identifierPool;
RCTIdentifierPool<17> _identifierPool;
RCTSurfacePointerHandler *_pointerHandler;
}