Files
react-native/packages/react-native
Nick GerlemanandBlake Friedman 3ce4b80e6f Include existing attributes in newly typed text (#47018)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47018

This change makes it so that newly typed text in a TextInput will include the existing attributes present based on cursor position. E.g. if you type after an inner fragment with blue text, the next character will be blue (or, an event emitter specific to an inner fragment will also be expanded). This is a behavior change for the (admittedly rare) case of uncontrolled TextInput with initially present children AttributedText, but more often effect controlled components, before state update (we are after, less likely to need to reset AttributedString because of mismatch).

Originally included this in D64121570, but it's not needed to fix the common case since we include paragraph-level event emitter as part of default attributes, and has some of its own risk, so I decided it is better separate.

Changelog:
[iOS][Changed] - Include existing attributes in newly typed text

Reviewed By: cipolleschi

Differential Revision: D64352310

fbshipit-source-id: 90ef8c49f50186eadf777e81cf6af57e1aada207
2024-11-12 18:58:46 +00:00
..
2024-10-31 11:20:25 +00:00
2024-10-29 10:55:33 +00:00
2024-10-29 10:55:33 +00:00
2024-11-12 18:57:54 +00:00
2024-11-12 18:58:36 +00:00
2024-10-31 10:25:02 +00:00
2024-10-29 10:55:33 +00:00

Where is the template?

The React Native Template has moved from being shipping inside the react-native package to it's own package: @react-native-community/template.

Why has it moved?

The React Native Frameworks RFC0759 provides background information.

When was it moved?

The 0.75 release.