react-native/Libraries/Components
Janic Duplessis ffe6c110f7 Fix keyboard handling with keyboardShouldPersistTaps: never
Summary:
When `keyboardShouldPersistTaps` is `"never"` it would break when doing the following steps:

- Tap input 1, keyboard goes up
- Tap input 2, keyboard stays down (The bug I expected without the isTextInput check was that it would dismiss instead :o )
- Tap outside, keyboard stays down. It should dismiss here since it should never persist taps (unless tapping another input)

What seems to happen is that RN `currentlyFocusedTextInput` goes out of sync with the focused text input and is null even if there is still a text input focused. I haven't had time to investigate the cause of that (probably some race condition because of trying to focus and blur at the same time) but we should not try to dismiss the keyboard when tapping another TextInput in the first place.

I reproduced the bug mentioned by setting `keyboardShouldPersistTaps` to `"never"` in RNTesterPage.js and then using the steps described above. I made sure that the bug did not happen after this change.

[GENERAL][BUGFIX][ScrollResponder] - Fix keyboard handling with keyboardShouldPersistTaps: never
Closes https://github.com/facebook/react-native/pull/19255

Differential Revision: D8002818

Pulled By: mdvacca

fbshipit-source-id: 6ecb8d2c30eb9338529471a958b5dc04037c7ec6
2018-05-14 23:46:50 -07:00
..
AccessibilityInfo Prettier React Native Libraries 2018-05-10 19:10:38 -07:00
ActivityIndicator Flow Typing ActivityIndicator 2018-05-12 10:35:27 -07:00
AppleTV Spread TVViewProps into ViewProps instead of intersection 2018-05-12 10:35:26 -07:00
CheckBox Remove @providesModule from all modules 2018-04-25 07:37:10 -07:00
Clipboard Prettier React Native Libraries 2018-05-10 19:10:38 -07:00
DatePicker Flow Type DatePickerIOS.ios.js 2018-05-12 10:35:27 -07:00
DatePickerAndroid Prettier React Native Libraries 2018-05-10 19:10:38 -07:00
DrawerAndroid Prettier React Native Libraries 2018-05-10 19:10:38 -07:00
Keyboard RN: Switch KeyboardAvoidingView to Class Syntax 2018-05-14 17:52:25 -07:00
MaskedView Make ViewProps Exact 2018-05-12 10:35:27 -07:00
Navigation Prettier React Native Libraries 2018-05-10 19:10:38 -07:00
Picker Flowtype PickerIOS 2018-05-14 00:24:44 -07:00
ProgressBarAndroid Prettier React Native Libraries 2018-05-10 19:10:38 -07:00
ProgressViewIOS Flowtype ProgressViewIOS 2018-05-14 00:24:44 -07:00
RefreshControl Flowtype RefreshControl 2018-05-14 00:24:44 -07:00
SafeAreaView Prettier React Native Libraries 2018-05-10 19:10:38 -07:00
ScrollView Flowtype ListView 2018-05-14 00:24:44 -07:00
SegmentedControlIOS Flowtype SegmentedControlIOS 2018-05-14 00:24:44 -07:00
Slider Flowtype Slider 2018-05-14 00:24:44 -07:00
StatusBar Prettier React Native Libraries 2018-05-10 19:10:38 -07:00
Switch Flowtype Switch 2018-05-14 00:24:44 -07:00
TabBarIOS Make ViewProps Exact 2018-05-12 10:35:27 -07:00
TextInput FlowType TextInput 2018-05-14 00:24:44 -07:00
TimePickerAndroid Prettier React Native Libraries 2018-05-10 19:10:38 -07:00
ToastAndroid Prettier React Native Libraries 2018-05-10 19:10:38 -07:00
ToolbarAndroid Prettier React Native Libraries 2018-05-10 19:10:38 -07:00
Touchable Removing unnecessary FlowFixMe 2018-05-14 00:24:44 -07:00
UnimplementedViews Remove @providesModule from all modules 2018-04-25 07:37:10 -07:00
View RN: Fix Type for ReactNative.NativeComponent (1/2) 2018-05-13 01:05:56 -07:00
ViewPager Prettier React Native Libraries 2018-05-10 19:10:38 -07:00
WebView Prettier React Native Libraries 2018-05-10 19:10:38 -07:00
Button.js Prettier React Native Libraries 2018-05-10 19:10:38 -07:00
ScrollResponder.js Fix keyboard handling with keyboardShouldPersistTaps: never 2018-05-14 23:46:50 -07:00
StaticContainer.react.js Prettier React Native Libraries 2018-05-10 19:10:38 -07:00
StaticRenderer.js Prettier React Native Libraries 2018-05-10 19:10:38 -07:00
Subscribable.js Prettier React Native Libraries 2018-05-10 19:10:38 -07:00