From fa68e7d903e10eaf0dd0a9030314045724754f6f Mon Sep 17 00:00:00 2001 From: Bohdan Pomohaibo Date: Tue, 17 Nov 2026 01:36:58 +0200 Subject: [PATCH] Reproducer for #60013: single-line TextInput loses nested Text styles after a text size change --- .../examples/Playground/RNTesterPlayground.js | 38 ++++++++++++++++++- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js b/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js index 8e6b10479de7..aa4315bfb38f 100644 --- a/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js +++ b/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js @@ -12,22 +12,56 @@ import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; import RNTesterText from '../../components/RNTesterText'; import * as React from 'react'; -import {StyleSheet, View} from 'react-native'; +import {StyleSheet, Text, TextInput, View} from 'react-native'; +// https://github.com/react/react-native/issues/60013 +// Change the OS text size while the app runs (Settings > Accessibility > +// Display & Text Size > Larger Text, or +// `xcrun simctl ui booted content_size accessibility-large`), then go back. +// Expected: "word" stays red and in Courier in both inputs. +// Actual on iOS: the single-line input draws all of its text in the default +// color and font. function Playground() { return ( - Edit "RNTesterPlayground.js" to change this file + Change the OS text size (Settings > Accessibility > Display & + Text Size > Larger Text), then come back. "word" must stay + red and in Courier in both inputs. + Single-line + + + plain word end + + + Multiline + + + plain word end + + ); } const styles = StyleSheet.create({ container: { + gap: 12, padding: 10, }, + input: { + borderWidth: 1, + fontSize: 18, + padding: 8, + }, + word: { + color: 'red', + fontFamily: 'Courier', + }, }); export default {