From 166a96bcee5ac5407be3dc3cc8803789e42b07a2 Mon Sep 17 00:00:00 2001 From: Andrei Coman Date: Mon, 5 Oct 2015 10:19:28 -0700 Subject: [PATCH] Fix keyboardShouldPersistTaps default value Reviewed By: @astreet Differential Revision: D2507878 --- Libraries/Components/ScrollResponder.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/Components/ScrollResponder.js b/Libraries/Components/ScrollResponder.js index 3dc162dfa..7e98cc502 100644 --- a/Libraries/Components/ScrollResponder.js +++ b/Libraries/Components/ScrollResponder.js @@ -181,7 +181,7 @@ var ScrollResponderMixin = { scrollResponderHandleStartShouldSetResponderCapture: function(e: Event): boolean { // First see if we want to eat taps while the keyboard is up var currentlyFocusedTextInput = TextInputState.currentlyFocusedField(); - if (this.props.keyboardShouldPersistTaps === false && + if (!this.props.keyboardShouldPersistTaps && currentlyFocusedTextInput != null && e.target !== currentlyFocusedTextInput) { return true; @@ -242,7 +242,7 @@ var ScrollResponderMixin = { // By default scroll views will unfocus a textField // if another touch occurs outside of it var currentlyFocusedTextInput = TextInputState.currentlyFocusedField(); - if (this.props.keyboardShouldPersistTaps === false && + if (!this.props.keyboardShouldPersistTaps && currentlyFocusedTextInput != null && e.target !== currentlyFocusedTextInput && !this.state.observedScrollSinceBecomingResponder &&