Skip to content

Commit

Permalink
Fix for scrollview android
Browse files Browse the repository at this point in the history
Summary:
Trying this again with a fresh pullrequest as the old one kept having issued due to rebasing.

Fixes facebook#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 facebook#16635 and tested this fix worked

[ANDROID] [BUGFIX] [ScrollView] - Check that isTouching is also set when dismissing keyboard with on-drag android.
Closes facebook#18785

Differential Revision: D7569815

Pulled By: hramos

fbshipit-source-id: 2a07369297ce9ce5a7714e513ccb480ee7011a4d
  • Loading branch information
mistenkt authored and LukeDurrant committed Apr 11, 2018
1 parent c4e4077 commit 03fb3c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/Components/ScrollView/ScrollView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit 03fb3c5

Please sign in to comment.