From 2f1421dec7cd3a35779caceac108e872033c7d72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn-Erik=20Andreasen?= Date: Tue, 10 Apr 2018 10:33:25 -0700 Subject: [PATCH] Fix for scrollview android Summary: Trying this again with a fresh pullrequest as the old one kept having issued due to rebasing. Fixes #16635 the issue is a little serious if you use a scrollview which contains textinput, you will never get a chance to input something since keyboard will always be dismissed because of on-drag event if your scroll-view use the property: keyboardDismissMode ='on-drag' verify the issue #16635 and tested this fix worked [ANDROID] [BUGFIX] [ScrollView] - Check that isTouching is also set when dismissing keyboard with on-drag android. Closes https://github.com/facebook/react-native/pull/18785 Differential Revision: D7569815 Pulled By: hramos fbshipit-source-id: 2a07369297ce9ce5a7714e513ccb480ee7011a4d --- Libraries/Components/ScrollView/ScrollView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Components/ScrollView/ScrollView.js b/Libraries/Components/ScrollView/ScrollView.js index bc57f5cb400b62..2d9d031027ca92 100644 --- a/Libraries/Components/ScrollView/ScrollView.js +++ b/Libraries/Components/ScrollView/ScrollView.js @@ -681,7 +681,7 @@ const ScrollView = createReactClass({ } } if (Platform.OS === 'android') { - if (this.props.keyboardDismissMode === 'on-drag') { + if (this.props.keyboardDismissMode === 'on-drag' && this.state.isTouching) { dismissKeyboard(); } }