react-native-windows icon indicating copy to clipboard operation
react-native-windows copied to clipboard

[Fabric] OnChangeText will fire twice when first typing in a textInput

Open TatianaKapos opened this issue 1 year ago • 1 comments

Problem Description

onChangeText should only fire once when typing a singe character. But when first typing on a TextInput, onChangeText will fire twice. See below for log of events for type "a" into a TextInput.

Paper image

Fabric image

Steps To Reproduce

  1. Type a single character into a textinput
  2. onChangeText will fire twice

Expected Results

OnChangeText will only fire once

CLI version

npx react-native -v

Environment

npx react-native info

Target Platform Version

None

Target Device(s)

No response

Visual Studio Version

None

Build Configuration

None

Snack, code example, screenshot, or link to a repository

No response

TatianaKapos avatar Feb 28 '24 21:02 TatianaKapos

This is happening because of an extra call from UpdateState, however that extra call is needed to get the right ordering of events. Not sure what is the solution here but will look at it later

TatianaKapos avatar Apr 02 '24 18:04 TatianaKapos