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

[Android] Modal overlay glitch when dismissing keyboard #619

Closed
shollington-rbi opened this issue Oct 8, 2024 · 4 comments · Fixed by #624
Closed

[Android] Modal overlay glitch when dismissing keyboard #619

shollington-rbi opened this issue Oct 8, 2024 · 4 comments · Fixed by #624
Assignees
Labels
🤖 android Android specific 🐛 bug Something isn't working 🌎 modal Anything that involves Modal usage

Comments

@shollington-rbi
Copy link

shollington-rbi commented Oct 8, 2024

Thank-you so much for creating this incredible library @kirillzyusko. It is by far the best React Native keyboard controller library and we're excited to swap out react-native-keyboard-aware-view.

We noticed an issue when attempting to integrate this into our app and was hoping you could help debug.

Describe the bug
The modal overlay no longer shades the full screen height when keyboard is dismissed at the same time as modal open.

Code snippet
You can reproduce with the repo's example project.

To Reproduce

  1. Compile and run the example project with yarn example android.
  2. Go to the Modal example.
  3. Click "show modal" and observe that that overlay shades the full screen height.
  4. Close modal and on the main screen, click the yellow keyboard input to make the keyboard shown.
  5. With the keyboard still visible, click "show modal" again and observe the keyboard dismisses and the overlay no longer spans the full screen height.

Expected behavior
The modal overlay should shade the full height of the screen including the space that the keyboard used to occupy when it is dismissed.

Screenshots
See animated GIF to the right captured from Pixel 3a API 34 Emulator.

@shollington-rbi shollington-rbi changed the title Android Modal Overlay Glitch: Reproducible w. Example Project [Android] Modal overlay glitch when dismissing keyboard Oct 8, 2024
@kirillzyusko kirillzyusko added 🐛 bug Something isn't working 🤖 android Android specific 🌎 modal Anything that involves Modal usage labels Oct 8, 2024
@kirillzyusko
Copy link
Owner

Thank you @shollington-rbi for the issue 🙌

I'm aware about that, but haven't found a fix yet 😔 As a workaround you can use that code: #387 (comment)

And in a meantime I'll try to find a solution for that 👀

@shollington-rbi
Copy link
Author

shollington-rbi commented Oct 8, 2024

Amazing, thank-you. I didn't see it amongst the open issues so apologies for creating a new one. We're working around it with the KeyboardController.dismiss() before the modal is shown as recommended.

@kirillzyusko
Copy link
Owner

@shollington-rbi I published 1.14.1! Feel free to try that 🙌

@shollington-rbi
Copy link
Author

Works like a charm! Thank you so much!

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 🌎 modal Anything that involves Modal usage
Projects
None yet
2 participants