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

hook is not reporting new keyboard height, when keyboard size was changed and keyboard wasn't closed interactively #144

Closed
kirillzyusko opened this issue Apr 14, 2023 · 0 comments · Fixed by #145
Assignees
Labels
🤖 android Android specific 🐛 bug Something isn't working 👆 interactive keyboard Anything related to interactive keyboard dismissing

Comments

@kirillzyusko
Copy link
Owner

Describe the bug

A clear and concise description of what the bug is.

Repo for reproducing

Example app.

To Reproduce

Steps to reproduce the behavior:

  1. Go to Interactive keyboard android screen.
  2. Click on TextInput
  3. Swipe a little bit down and a release a finger (this gesture shouldn't close the keyboard)
  4. Change keyboard size by switching to a new input mode

Expected behavior

Hook should return actual keyboard height.

Screenshots

VID_20230414_222723_232.mp4

Smartphone (please complete the following information):

  • Desktop OS: MacOS 13
  • Device: Pixel 7 Pro
  • OS: Android 13
  • RN version: 0.71
  • RN architecture: old (paper)
  • JS engine: Hermes
  • Library version: 1.5.1

Additional context

I think keyboardProvidet.isInteractive has incorrect value, when finger is released/after animation.

@kirillzyusko kirillzyusko added 🐛 bug Something isn't working 🤖 android Android specific 👆 interactive keyboard Anything related to interactive keyboard dismissing labels Apr 14, 2023
@kirillzyusko kirillzyusko self-assigned this Apr 14, 2023
kirillzyusko added a commit that referenced this issue Apr 18, 2023
## 📜 Description

Update class member `isKeyboardVisible` field in `onEnd` lifecycle
instead of creating a new local variable.

## 💡 Motivation and Context

Since `onEnd` may have a different state of `isKeyboardVisible`, we need
to update a class variable instead of creating a new local variable,
since otherwise the state may be unsynchronised which can lead to
different issues.

These changes shouldn't introduce any new problem, since
`isKeyboardVisible` is getting updated in `onStart` callback and in
`onEnd` most of the time it will have the same value as in `onStart`.

Fixes:
#144

## 📢 Changelog

### Android
- update `isKeyboardVisible` in `onEnd` callback;

## 🤔 How Has This Been Tested?

Tested on:
- Pixel 3a (Android 13, emulator);
- Pixel 7 Pro (Android 13, real device).

## 📸 Screenshots (if appropriate):


https://user-images.githubusercontent.com/22820318/232770424-8e70995a-72f9-4d4b-a3d4-07054e25a632.mp4

## 📝 Checklist

- [x] CI successfully passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android Android specific 🐛 bug Something isn't working 👆 interactive keyboard Anything related to interactive keyboard dismissing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant