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

Snackbar rendering behind keyboard on iOS #78

Open
johakr opened this issue May 17, 2018 · 8 comments
Open

Snackbar rendering behind keyboard on iOS #78

johakr opened this issue May 17, 2018 · 8 comments
Labels

Comments

@johakr
Copy link

johakr commented May 17, 2018

Hi,

on iOS the snackbar always renders on the bottom behind the keyboard if keyboard is open. Is this intended behavior / a known limitation?

@cooperka
Copy link
Owner

Hi @johakr, this is not intended behavior and should be fixed. It should be possible to account for the keyboard height. I'm happy to accept a PR for this.

@cooperka cooperka added the bug label May 19, 2018
@jdrorrer
Copy link

@johakr one fix could be to import { Keyboard } from 'react-native' and call Keyboard.dismiss() when a certain event handler is called. Here's more info: https://facebook.github.io/react-native/docs/keyboard.html

@faisalkhan1690
Copy link

@jdrorrer Thanks for this workaround it really saved my day.

@cooperka
Copy link
Owner

Hi @faisalkhan1690, I saw you posted #105 about this happening on Android also. Can you post any screenshots or an app to repro this? It uses the native Android Snackbar component so this shouldn't be happening unless something weird is going on like the Snackbar getting attached to a non-main view.

@rahulchowdhury
Copy link

Any updates on this issue?

@cooperka
Copy link
Owner

@rahulchowdhury no updates, do you have time to help out and submit a PR?

@rahulchowdhury
Copy link

Hey @cooperka, sorry mate, I'm not a React dev. Found this issue when I contributed once to a project inside the company I work for.

I'll ask the concerned developer to have a look at this. 😀

@ravi-roxiler
Copy link

We can use marginBottom props and pass the value by importing keyboard property from react-native import {Keyboard} from 'react-native' and use as marginBottom: Keyboard.metrics()?.height.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants