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

onKeyboardWillShow is called after keyboard opens. #22969

Closed
3 tasks done
nandiniparimi1107 opened this issue Jan 12, 2019 · 3 comments
Closed
3 tasks done

onKeyboardWillShow is called after keyboard opens. #22969

nandiniparimi1107 opened this issue Jan 12, 2019 · 3 comments
Labels
API: Keyboard Bug Resolution: Locked This issue was locked by the bot.

Comments

@nandiniparimi1107
Copy link

Environment

Run react-native info in your terminal and paste its contents here.
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 79.25 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.0.0 - /usr/local/Cellar/node/11.0.0/bin/node
Yarn: 1.10.1 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 23, 24, 25, 26, 27, 28
Build Tools: 23.0.1, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.3
System Images: android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.1 => 16.6.1
react-native: 0.57.7 => 0.57.7
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7

Description

I have a chat screen with TextInput at the bottom of the screen. I would like to have smooth animation when keyboard opens, but the keyboard opens before the onKeyboardWillShow is called.Hence there is a glitch/delay for the flatlist resize.

Reproducible Demo

Untitled.zip

@bradfloodx
Copy link

bradfloodx commented Jan 14, 2019

Hi @nandiniparimi1107 you will need to provide an example Reproducible Demo in code format. That is, a simple demo app in code format that proves this is an issue with react-native (and not just an issue with your code).

@rchanaud
Copy link

rchanaud commented Feb 20, 2019

I have the same issue on React Native 0.58.4.

I also have a strange behaviour of event firing when using the example code of the Keyboard doc only on iOS (on the iOS simulator / in an android real device it works).

  • When I show the keyboard via TextField focus the keyboardDidShow event is fired 3 times.
  • When I dismiss the keyboard when pressing outside of it, the keyboardDidHide event is fired then immediately after the keyboardDidShow event is fired.

It seems to be related to #18003

@dulmandakh
Copy link
Contributor

React Native is asynchronous, and it cannot ensure that event is delivered before UI change.

@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
API: Keyboard Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

6 participants