react-native-paper
react-native-paper copied to clipboard
Menu does not avoid intersecting keyboard on Android
Current behaviour
When a Menu is created near the bottom of the app, while the keyboard is expanded, the Menu opens behind the keyboard.
Expected behaviour
I expect the menu to open upwards instead.
Code sample
I don't have one that's easy to run, unfortunately :(
Screenshots (if applicable)

What have you tried
I looked at the documented props, and did not find any that controlled the direction that the Menu attempts to open in.
Your Environment
| software | version |
|---|---|
| ios or android | Android 11 |
| react-native | 0.63.4 |
| react-native-paper | ^4.8.1 |
| node | N/A |
| npm or yarn | yarn |
| expo sdk | N/A |
Hey! Thanks for opening the issue. The issue doesn't seem to contain a link to a repro (a snack.expo.io link or link to a GitHub repo under your username).
Can you provide a minimal repro which demonstrates the issue? A repro will help us debug the issue faster. Please try to keep the repro as small as possible and make sure that we can run it without additional setup.
Couldn't find version numbers for the following packages in the issue:
react-native-vector-iconsnpmyarnexpo
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.
The versions mentioned in the issue for the following packages differ from the latest versions on npm:
react-native(found:0.63.4, latest:0.64.2)react-native-paper(found:4.8.1, latest:4.9.1)
Can you verify that the issue still exists after upgrading to the latest versions of these packages?
@WesleyAC how about wrapping it with KeyboardAvoidingView ?
Any solution to this issue?
I think there is a need to go through the Menu layout's calculation and take into account the height of the keyboard when it is opened.