You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[50$] Feature Request / Bug Report - iOS / Android onPress action for <ContextMenu.Trigger> that doesn't conflict with normal the actual ContextMenu Deployment #145
First of all, I want to show my sincere appreciation for this library and all the wonderful docs. Its absolutely phenomenal.
This issue has sort of been bothering me in our app for a while. There is a "workaround" available for iOS, which I'm not a huge fan of, but it's still flaky on Android.
Desired Functionality:
I wrap my some content in my app with a <ContextMenu>. That content is a wrapped in a TouchableOpacity. The functionality I desire is:
User quickly taps on that content, it takes them to play the video or full screen the image (similar to the repro)
If a user long presses on the content, they can "Share", "Comment" or "Delete" (all options within my Context Menu)
The Problem
The onPress of my "Touchable" currently interacts with the deployment of the <ContextMenu/>. When you long tap on the context menu it also fires the onPress of the button. Here is a video of the issue.
The Workaround (Identified here)
On iOS the workaround fairly solid. You essentially make the onLongPress of the inner Touchable an empty function like so:
<ContextMenu.Triggeraction="longPress"><TouchableOpacityonPress={onQuickPress}/**THIS IS A WORKAROUND TO AVOID ACCIDENTAL FIRING OF BUTTON */onLongPress={()=>{}}activeOpacity={0.7}>{children}</TouchableOpacity></ContextMenu.Trigger>
Note: It seems to work well on iOS and Android via simulator, but in reality, just scrolling on a real android device triggers this context menu sometimes. It's just not an ideal user experience. Really this needs a real solution where the context menu itself has its on onPress event that handles all of this stuff.
Hope this helps. I've tried using gesture handler too but it didn't work as expected. Use a native Touchable or Pressable to wrap the entire menu.
This fixed my android issue of tapping the button and it still opened the menu for some reason (Exactly as your case shows in the video)
Same here — I can reproduce this on my side too. The only way I’ve been able to make it work is by using a hack like onLongPress={() => {}} (no-op). It feels like the only practical workaround right now. Hoping there’s a real fix upstream.
This seems to be a type of problem I've solved before (although the performance isn't 100% identical, I believe the underlying cause is the same).
@ChristopherGabba I'd like to ask if this bounty is still valid? If it is, I can provide a PR and demo video (based on a real device, not a simulator) for the repository you provide. If you confirm it's valid, you can pay me the bounty via Apple gift card or crypto.
This seems to be a type of problem I've solved before (although the performance isn't 100% identical, I believe the underlying cause is the same).
@ChristopherGabba I'd like to ask if this bounty is still valid? If it is, I can provide a PR and demo video (based on a real device, not a simulator) for the repository you provide. If you confirm it's valid, you can pay me the bounty via Apple gift card or crypto.
i'll pay u the bounty if the pr gets merged into Zeego. I hate this workaround
This seems to be a type of problem I've solved before (although the performance isn't 100% identical, I believe the underlying cause is the same). @ChristopherGabba I'd like to ask if this bounty is still valid? If it is, I can provide a PR and demo video (based on a real device, not a simulator) for the repository you provide. If you confirm it's valid, you can pay me the bounty via Apple gift card or crypto.
i'll pay u the bounty if the pr gets merged into Zeego. I hate this workaround
Hi, maybe you don't need a pr merged into the zeego, you can use patch-package or yarn package to make your workaround available in your repository
Activity
krevnekak commentedon Mar 21, 2025
same problem
bogdandobritoiu commentedon Apr 16, 2025
I've encountered the same issue but not with DropdownMenu.
Solution is to have a state for disable and add a TouchableOpacity around the entire DropdownMenu.
Hope this helps. I've tried using gesture handler too but it didn't work as expected. Use a native Touchable or Pressable to wrap the entire menu.
This fixed my android issue of tapping the button and it still opened the menu for some reason (Exactly as your case shows in the video)
smanzler commentedon May 15, 2025
same issue, I am going to use the same workout around setting onLongPress to () => {}
vladislav-gorovenko commentedon Jul 17, 2025
Thanks for workaround
hlog2e commentedon Jan 7, 2026
Same here — I can reproduce this on my side too. The only way I’ve been able to make it work is by using a hack like onLongPress={() => {}} (no-op). It feels like the only practical workaround right now. Hoping there’s a real fix upstream.
richardo2016 commentedon Jan 7, 2026
This seems to be a type of problem I've solved before (although the performance isn't 100% identical, I believe the underlying cause is the same).
@ChristopherGabba I'd like to ask if this bounty is still valid? If it is, I can provide a PR and demo video (based on a real device, not a simulator) for the repository you provide. If you confirm it's valid, you can pay me the bounty via Apple gift card or crypto.
mateofowlerz commentedon Jan 12, 2026
i'll pay u the bounty if the pr gets merged into Zeego. I hate this workaround
richardo2016 commentedon Jan 12, 2026
Hi, maybe you don't need a pr merged into the zeego, you can use patch-package or yarn package to make your workaround available in your repository
mateofowlerz commentedon Jan 12, 2026
mateofowlerz commentedon Jan 12, 2026
The workaround wasn't working 100% of the time for me and adding the delay solved it.
onPress={handlePress} onLongPress={() => {}} delayLongPress={100}Source: dominicstop/react-native-ios-context-menu#9 (comment)
orgorin023 commentedon Jun 16, 2026
Opened PR #196 with a native long-press trigger fix: https://github.com/nandorojo/zeego/pull/196\n\nIt wraps the trigger child press handler only for native long-press triggers so the trailing press after the context menu opens is swallowed once, while normal press behavior resumes afterwards.