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

[Android] Menu flashes when opening

Open lovegaoshi opened this issue 2 months ago • 5 comments

Current behaviour

The menu component flashes when opening the menu via visible=true. I think this is actually not observable in production builds (with a Samsung S21) but rather in poor performance scenarios (dev, emulator)

Expected behaviour

The menu doesnt flash

How to reproduce?

show a menu

Preview

the video only shows the menu flashing once; in the actual emulator it flashes every time when the menu opens

https://github.com/user-attachments/assets/37fa7177-a05e-4a21-bdac-718822acc5bd

What have you tried so far?

add

await new Promise(resolve => setTimeout(resolve, 1));

fixes this issue; unfortunately I learned enough from experience to know this works but cant tell why.

Your Environment

software version
ios n/a
android 36
react-native 0.81.4
react-native-paper 5.14.5
node 22
npm or yarn yarn v4
expo sdk 54

lovegaoshi avatar Oct 01 '25 20:10 lovegaoshi

Same issue. I can't even open the menu again

redskull-git avatar Oct 02 '25 03:10 redskull-git

Same issue. I can't even open the menu again

Did you find a solution? I also experience this issues. 1st tap it will open the menu but 2nd tap it will not show again.

f-sula avatar Oct 03 '25 15:10 f-sula

what ur asking for is already an issue https://github.com/callstack/react-native-paper/issues/4807

ill copy what my reply over there here

i'd start logging rendered, visible and prevRendered.current.

if ur setting the menu's visible via ondismiss, check out #4813

for the opening animation checkout #4812

lovegaoshi avatar Oct 03 '25 16:10 lovegaoshi

To be honest, this is a different issue @lovegaoshi. I am experiencing the flash during the opening of the menus, not the problems described in the issue you linked. And none of the solutions listed in your links work for me.

Anyone else having this issue? It's pretty bad as a user experience.

igghera avatar Oct 20 '25 12:10 igghera

I think the current Menu component is not working very much as expected, especially since the upgrade to newer versions of react-native / expo, fixes and suggestions from the maintainers are very unlikely to come out anytime soon, based on #4802. Consider other components such as Dialog or use other libraries such as BottomSheet or Drawer to workaround for the time-being. Or else #4807 is the best solution we have so far that resolves the issue

Bk49 avatar Dec 08 '25 06:12 Bk49