6 of 6 standards met
Summary: The existing range guard in the UITextView delegate (added in #24084) only checks range.location + range.length > text.length. It doesn't handle range.location > text.length, which causes an unsigned integer underflow in the clamped length, still crashing with NSRangeException. See #45050 for another report of this. The UITextField delegate has no range validation at all. This PR adds a range.location > textLength early return to both delegate adapters, ahead of the existing length clamping. Changelog: [IOS] [FIXED] - Fix NSRangeException crash in RCTBackedTextInputDelegateAdapter when text range is out of bounds Test Plan: This is a race condition between iOS computing the text range and React Native updating the backing text (e.g. controlled TextInput state updates, maxLength truncation, autocorrect). It's difficult to reproduce deterministically but shows up in production crash logs. The fix is straightforward defensive bounds checking before calling replaceCharactersInRange:.
Summary: Adds to the Fantom custom implementation, matching Jest's inline snapshot behavior. On first run, snapshot values are written directly into the test source file as template literal arguments. On subsequent runs, values are compared and the test fails on mismatch unless the flag is passed to force an update. The implementation spans the two-process Fantom architecture: Runtime (Hermes VM): : New method that compares received values against existing inline snapshots, captures stack traces for new/mismatched snapshots, and tracks results per test. : New method on the class that serializes values with and delegates to snapshot context. : Plumbs through . Runner (Node.js): : New resolves VM stack traces back to original source locations via source map symbolication. New directly rewrites the test source file by finding each call and replacing its argument with the formatted template literal. This avoids jest-snapshot's which requires Babel and Prettier 2.x. : Generates source maps when inline snapshots need updating, collects pending snapshots across test configs, and writes them after all configs complete. Changelog: [Internal] Differential Revision: D95077617
Repository: facebook/react-native. Description: A framework for building native applications using React Stars: 125504, Forks: 25106. Primary language: C++. Languages: C++ (33.9%), Kotlin (19.6%), JavaScript (18.9%), Objective-C++ (11.2%), Objective-C (6.9%). License: MIT. Homepage: https://reactnative.dev Topics: android, app-framework, cross-platform, ios, mobile, mobile-development, react, react-native. Latest release: v0.84.1 (6d ago). Open PRs: 100, open issues: 1129. Last activity: 18m ago. Community health: 87%. Top contributors: mdvacca, shergin, cortinico, sammy-SC, javache, RSNara, cipolleschi, rubennorte, NickGerleman, JoshuaGross and others.
C++
Last 12 weeks ยท 743 commits
Description After upgrading from React Native 0.83.2 to 0.84.0, ScrollView and FlatList content becomes invisible on iOS when navigating to the same screen a second time while RTL mode is active (). The content renders correctly on the first visit but disappears on subsequent navigations. This is a regression โ 0.83.2 works correctly, on Android 0.84.0. Expected behavior ScrollView/FlatList content should render correctly on every navigation, regardless of how many times the screen has been visited. Actual behavior First visit: Content renders correctly Second visit: Content is invisible (some screens show content "pushed to the side, barely visible") Third visit: Content completely invisible Key observations from debugging React-side layout values are correct โ reports identical dimensions on both first and second visits (e.g., container: 402x768, scrollView: 402x682, contentSize: 402x839) Components DO mount and render โ in render confirms execution This is a native iOS rendering issue, not a React rendering issue LTR mode works perfectly โ switching to English (LTR) eliminates the bug entirely Setting (opposite of RTL) on a wrapper View fixes the issue โ but this breaks LTR mode, confirming it's related to how the native style property interacts with Affects ALL screens with ScrollView/FlatList, not specific components Not related to Modals, navigation transitions, or Switching to does NOT fix the issue โ confirming it's a core RN problem React Native Version Broken: 0.84.0 (IOS) Working: 0.83.2 ## Environment React Native: 0.84.0 React: 19.2.0 @react-navigation/stack: 7.8.2 @react-navigation/native: 7.1.31 react-native-screens: 4.24.0 Xcode: 16.x iOS Simulator: iPhone (various models) New Architecture (Fabric): enabled (default in 0.84) Steps to reproduce 1. Enable RTL mode: 2. Use (JS-based stack navigator) with 3. Navigate to any screen containing a or 4. Go back 5. Navigate to the same screen again 6. Content is invisible** โ the screen renders, but ScrollView/FlatList children are not visible React Native Version 0.84.0 Affected Platforms Runtime - iOS Output of Stacktrace or Logs MANDATORY Reproducer https://github.com/react-native-community/reproducer-react-native/blob/main/ReproducerApp/package.json Screenshots and Videos _No response_