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

[iOS] Multiple TextInput components inside a ScrollView - Keyboard not closing on Keyboard.dismiss() #19125

Closed
hbarylskyi opened this issue May 4, 2018 · 6 comments
Labels
Bug Component: TextInput Related to the TextInput component. Resolution: Locked This issue was locked by the bot.

Comments

@hbarylskyi
Copy link

hbarylskyi commented May 4, 2018

Having multiple TextInputs inside a ScrollView with keyboardShouldPersistTaps="handled" will prevent Keyboard from closing.

Environment

Environment:
OS: macOS High Sierra 10.13.3
Node: 8.9.0
Yarn: 1.2.1
npm: 5.8.0
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: 2.3 AI-162.4069837

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

Steps to Reproduce

import React, { Component } from 'react';
import { ScrollView, TextInput, Button, Keyboard, View } from 'react-native';

class App extends Component {
  render() {
         <ScrollView>
             <TextInput style={{ backgroundColor: 'red', margin: 1, marginTop: 20 }} />
             <TextInput style={{ backgroundColor: 'red', margin: 1 }} />
             <Button onPress={Keyboard.dismiss} title={'Close keyboard'} />
         </ScrollView>
   }
}

Tap on the first TextInput, after Keyboard was shown, tap on the second one. Then tap on the button.

Expected Behavior

Keyboard should hide after button tap

Actual Behavior

Keyboard is not being hidden

@react-native-bot react-native-bot added the Component: TextInput Related to the TextInput component. label May 4, 2018
@AliDroid
Copy link

only ios

@hbarylskyi hbarylskyi changed the title Multiple TextInput components inside a ScrollView - Keyboard not closing on Keyboard.dismiss() [iOS] Multiple TextInput components inside a ScrollView - Keyboard not closing on Keyboard.dismiss() May 14, 2018
@fungilation
Copy link

I'm seeing the same thing, on Android only. I have in AndroidManifest.xml, android:windowSoftInputMode="adjustResize". And instead of 2 native inputs, my input is within a webview. After focusing on a web input inside webview, I cannot dismiss keyboard via Keyboard.dismiss() (nothing happens).

@stale
Copy link

stale bot commented Sep 13, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 13, 2018
@fungilation
Copy link

Hey bot, here's some activity.

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 13, 2018
@bduyng
Copy link

bduyng commented Nov 1, 2018

hi guys, any updates on this issue?

@michalchudziak
Copy link
Contributor

Hello there 👋 by using the repro / the list of steps to reproduce, we can't actually see the reported bug on RN 0.59 so we'll close this issue. It may have something to do with your local setup, please double check that you are using the correct version of Android Studio / XCode / Android NDK / Yarn / etc.

@facebook facebook locked as resolved and limited conversation to collaborators Mar 19, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: TextInput Related to the TextInput component. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

7 participants