mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 04:35:36 +08:00
Fix keyboardShouldPersistTaps default value
Reviewed By: @astreet Differential Revision: D2507878
This commit is contained in:
committed by
facebook-github-bot-3
parent
babdeb33ba
commit
166a96bcee
@@ -181,7 +181,7 @@ var ScrollResponderMixin = {
|
|||||||
scrollResponderHandleStartShouldSetResponderCapture: function(e: Event): boolean {
|
scrollResponderHandleStartShouldSetResponderCapture: function(e: Event): boolean {
|
||||||
// First see if we want to eat taps while the keyboard is up
|
// First see if we want to eat taps while the keyboard is up
|
||||||
var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();
|
var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();
|
||||||
if (this.props.keyboardShouldPersistTaps === false &&
|
if (!this.props.keyboardShouldPersistTaps &&
|
||||||
currentlyFocusedTextInput != null &&
|
currentlyFocusedTextInput != null &&
|
||||||
e.target !== currentlyFocusedTextInput) {
|
e.target !== currentlyFocusedTextInput) {
|
||||||
return true;
|
return true;
|
||||||
@@ -242,7 +242,7 @@ var ScrollResponderMixin = {
|
|||||||
// By default scroll views will unfocus a textField
|
// By default scroll views will unfocus a textField
|
||||||
// if another touch occurs outside of it
|
// if another touch occurs outside of it
|
||||||
var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();
|
var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();
|
||||||
if (this.props.keyboardShouldPersistTaps === false &&
|
if (!this.props.keyboardShouldPersistTaps &&
|
||||||
currentlyFocusedTextInput != null &&
|
currentlyFocusedTextInput != null &&
|
||||||
e.target !== currentlyFocusedTextInput &&
|
e.target !== currentlyFocusedTextInput &&
|
||||||
!this.state.observedScrollSinceBecomingResponder &&
|
!this.state.observedScrollSinceBecomingResponder &&
|
||||||
|
|||||||
Reference in New Issue
Block a user