react-native/Libraries/Text
Valentin Shergin d7fa81f181 Fixed double `onChange` event triggering from <TextInput> on iOS
Summary:
The problem was recently introduced in the last refactoring of the Text module.
There are two problem actually:
(1) Compare this current code with stable version.
In the stable version the event is only triggered here:
https://github.com/facebook/react-native/blob/0.52-stable/Libraries/Text/RCTTextField.m#L132-L140
In the new version the event is triggered in two places (which is obviously wrong).

(2) Executing `[_eventDispatcher sendTextEventWithType:RCTTextEventTypeChange:...]` and _onChange() actually do the same thing.
Historically, the single-line <TextInput> used the first approach and multi-line used second one. When we unify the logic, mixed both of them, which was apparenly wrong.
So, we have to remove another call of `[_eventDispatcher sendTextEventWithType:RCTTextEventTypeChange:...]`.
The the future we have to completly remove usage of `_eventDispatcher` from this component.

Depends on D6854770.

Reviewed By: fkgozali

Differential Revision: D6869678

fbshipit-source-id: 6705ee8dda2681ae184ef6716238cc8b62efeff1
2018-02-01 14:16:40 -08:00
..
BaseText The New <Text> on iOS 2018-01-24 00:03:01 -08:00
RCTText.xcodeproj The New <Text> on iOS 2018-01-24 00:03:01 -08:00
RawText The New <Text> on iOS 2018-01-24 00:03:01 -08:00
Text Fixed a bug when <Text> does not redraw native view on relayout 2018-01-25 21:33:20 -08:00
TextInput Fixed double `onChange` event triggering from <TextInput> on iOS 2018-02-01 14:16:40 -08:00
VirtualText The New <Text> on iOS 2018-01-24 00:03:01 -08:00
RCTConvert+Text.h The New <Text> on iOS 2018-01-24 00:03:01 -08:00
RCTConvert+Text.m iOS: Introduce spellCheck prop to TextInput 2016-11-25 04:28:28 -08:00
RCTTextAttributes.h The New <Text> on iOS 2018-01-24 00:03:01 -08:00
RCTTextAttributes.m The New <Text> on iOS 2018-01-24 00:03:01 -08:00
Text.js Text: Enabling RCTVirtualText for iOS 2018-01-30 20:35:39 -08:00
TextProps.js RN: Create TextProps (Flow for Text Props) 2018-01-05 23:30:22 -08:00
TextStylePropTypes.js Update remaining PropTypes references 2017-06-12 16:03:09 -07:00
TextUpdateTest.js @allow-large-files Flow v0.54.0 2017-09-06 03:33:43 -07:00