react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

Menu does not avoid intersecting keyboard on Android

Open WesleyAC opened this issue 4 years ago • 6 comments

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)

Screenshot_20210611-141306 Screenshot_20210611-141336

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

WesleyAC avatar Jun 11 '21 21:06 WesleyAC

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.

github-actions[bot] avatar Jun 11 '21 21:06 github-actions[bot]

Couldn't find version numbers for the following packages in the issue:

  • react-native-vector-icons
  • npm
  • yarn
  • expo

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?

github-actions[bot] avatar Jun 11 '21 21:06 github-actions[bot]

Here's a repro

Tested on react-native-paper 4.9.1, same issue.

WesleyAC avatar Jun 11 '21 21:06 WesleyAC

@WesleyAC how about wrapping it with KeyboardAvoidingView ?

brunohkbx avatar Jun 21 '21 16:06 brunohkbx

Any solution to this issue?

bombillazo avatar Aug 19 '22 20:08 bombillazo

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.

lukewalczak avatar Aug 22 '22 13:08 lukewalczak