[0.81] Add ability to make TurboModules eager init#16095
Open
acoates-ms wants to merge 7 commits intomicrosoft:0.81-stablefrom
Open
[0.81] Add ability to make TurboModules eager init#16095acoates-ms wants to merge 7 commits intomicrosoft:0.81-stablefrom
acoates-ms wants to merge 7 commits intomicrosoft:0.81-stablefrom
Conversation
* Minor text rendering perf improvement * Change files
…mpositionEventHandler (microsoft#16081) * fix: map Windows touch pointer IDs to small JS-safe identifiers in CompositionEventHandler (#1) * fix: map Windows touch pointer IDs to small JS-safe identifiers in CompositionEventHandler Windows touch input can assign arbitrarily large pointer IDs (e.g. 2233). The Fabric CompositionEventHandler was forwarding these directly as React Native touch identifiers via `activeTouch.touch.identifier = pointerId`. React Native's JS touch handler uses identifiers as direct array indices and hard-caps them at 20 — large values caused the JS layer to back-fill a 2000+ element sparse array, corrupting touch tracking state. The symptom: after scrolling a ScrollView/FlatList on a touch screen, Pressables and TouchableOpacities would remain stuck in a pressed state. Taps would fire at the coordinates where the scroll began rather than where the finger lifted. Fix: add `AllocateTouchIdentifier()` which cycles through identifiers [0, 19], skipping any slot already claimed by a live touch in `m_activeTouches`. This mirrors the approach iOS uses (cycling modulo RCTMaxTouches = 11 in RCTTouchHandler.m). The existing but unused `m_touchId` field is repurposed as the cycling base. Updated all dependent lookups that previously relied on `touch.identifier == pointerId` (which only worked accidentally) to use the `m_activeTouches` map key directly. Fixes: microsoft#16047 * fix: prevent unbounded m_touchId growth in CompositionEventHandler fallback path When all 20 touch slots are occupied, the fallback return in AllocateTouchIdentifier used post-increment (`m_touchId++ % kMaxTouchIdentifier`), which stored the raw incremented value back into m_touchId without a modulo wrap. Repeated hits would grow m_touchId past 19, breaking the cycling logic and eventually causing signed-integer overflow (UB). Fix by computing the wrapped return value first, then storing the next wrapped value back: captures fallback = m_touchId % kMaxTouchIdentifier, then m_touchId = (m_touchId + 1) % kMaxTouchIdentifier. * Create react-native-windows-2c040593-f202-44fc-a55c-5d523c493705.json * Reserve 1 for mouse * yarn format
* Implement outline properties on view * Change files * hostPlatformColorIsColorMeaningful impl * update snapshots * fix background clip * default black borders should still be rendered. * fix border sometimes being created behind the background * snapshots
…touch state (microsoft#16086) * fix: cancel active touches in onPointerCaptureLost to prevent zombie touch state (#2) * fix: cancel active touches in onPointerCaptureLost to prevent zombie touch state When the OS reclaims pointer capture mid-gesture (system back swipe, Alt+Tab, another window coming foreground), onPointerCaptureLost fired but never removed entries from m_activeTouches or dispatched a touchcancel to React Native JS. The result was a zombie active touch — RN JS believed a finger was still down, leaving Pressables and TouchableOpacities stuck in a pressed state until the next touch happened to reuse the same pointer ID and trigger the stale-touch cleanup in onPointerPressed. Fix: for each captured pointer in the lost-capture set, copy and erase the m_activeTouches entry before calling DispatchSynthesizedTouchCancelForActiveTouch, mirroring the pattern already used in onPointerPressed and onPointerReleased. The erase-before-dispatch ordering is required because DispatchSynthesizedTouchCancelForActiveTouch iterates m_activeTouches internally. * match the m_pointerCapturingComponentTag != -1 check already used in CapturePointer * Create react-native-windows-f47bdf2a-0807-483f-b63e-3c2c086bee92.json
* Add ability to register modules as eager init * Change files
vmoroz
approved these changes
May 7, 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.
Description
Cherry picking to 0.81:
#16083, #16081, #16074, #16086, #16093
Microsoft Reviewers: Open in CodeFlow