Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScrollView's KeyboardDismissMode= 'on-drag' doesn't work with KeyboardAvoidingView #20540

Closed
KeegsMcGeegs opened this issue Aug 5, 2018 · 4 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@KeegsMcGeegs
Copy link

KeegsMcGeegs commented Aug 5, 2018

Environment

Environment:
OS: Windows 10
Node: 10.0.0
Yarn: 1.6.0
npm: 6.0.0
Watchman: Not Found
Xcode: N/A
Android Studio: Version 3.1.0.0 AI-173.4720617

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.4 => 0.55.4

Description

When Using KeyboardAvoidngView with ScrollView's keyboardDismissMode= 'on-drag', the keyboard gets dismissed when clicking on an input field at the bottom of the screen. When clicking on the last input field within the ScrollView, the keyboard can't even be accessed because the View moving out of the way of the keyboard is being considered a drag.

Reproducible Demo

<KeyboardAvoidingView style={styles.container} enabled>
  <ScrollView
    style={{flex: 1}}
    keyboardShouldPersistTaps= 'handled'
    keyboardDismissMode= 'on-drag'
  >
    <TextInput
      style={{height: 40, borderColor: 'gray', borderWidth: 1}}
      onChangeText={(text) => this.setState({text})}
      value={this.state.text}
    />
    //About 10 more TextInputs
  </ScrollView>
</KeyboardAvoidingView>

@react-native-bot
Copy link
Collaborator

I am closing this issue because it does not appear to have been verified on the latest release, and there has been no followup in a while.

If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.

@react-native-bot react-native-bot added the Ran Commands One of our bots successfully processed a command. label Aug 20, 2018
@icastillejogomez
Copy link

This is still an issue. React native 0.56.1

@shyaniv7
Copy link

shyaniv7 commented Jan 16, 2019

work around

const keyboardDismissProp = Platform.OS === "ios" ? { keyboardDismissMode: "on-drag" } : { onScrollEndDrag: Keyboard.dismiss };

@hakkikonu
Copy link

Still an issue. IOS working well but on Android it is not working!

react-native: 0.58.4

@facebook facebook locked as resolved and limited conversation to collaborators Aug 20, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants