A framework for building native applications using React
Fabric: Only add selection of textinput payload when event is selectionChange (#51051)
Summary: Fixes https://github.com/facebook/react-native/issues/51020: TextInputChangeEventData does not contain selection (see [here](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts#L515-L518)). Additionally, Android does not have selection either (see [here](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextChangedEvent.kt#L33-L37)) (iOS old arch also not contains it). We can consolidate these to prevent any misleading information. ## Changelog: [IOS] [FIXED] - Fabric: Only add selection of textinput payload when event is selectionChange Pull Request resolved: https://github.com/facebook/react-native/pull/51051 Test Plan: TextInput `onChange`'s event should not contains `selection`. Reviewed By: javache Differential Revision: D76253999 Pulled By: cipolleschi fbshipit-source-id: 8a889cce4998be0e31f4aa33961759e7d228e06f
Z
zhongwuzw committed
3bfbaa8455a2893f683be1a9669cf7e8205bb434
Parent: 742ffa3
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 6/17/2025, 10:23:48 AM