react-native-windows
react-native-windows copied to clipboard
[Bug Fix][Fabric] Fix onChangeText firing twice when first typing in TextInput
Description
Type of Change
- Bug fix (non-breaking change which fixes an issue)
Why
In Fabric TextInput, when a user types a single character, the onChangeText callback was being triggered twice instead of once. This was inconsistent with Paper TextInput behavior and could cause issues in applications that rely on accurate change event counts.
Resolves [https://github.com/microsoft/react-native-windows/issues/12780 ]
What
The new solution uses text-based deduplication - it only emits onChange when the current text differs from the last text for which onChange was emitted. This prevents duplicate onChange events while preserving all expected onChange behavior.
Screenshots
()
Testing
E2E test ran succesfully
Changelog
yes
Add a brief summary of the change to use in the release notes for the next release.