-
Notifications
You must be signed in to change notification settings - Fork 20
Description
When I copy-paste the example from https://nativewindui.com/component/dropdown-menu with Expo SDK 54 it's not working.
Same for ContextMenu.
According to the @rn-primitives/context-menu documentation, the relativeTo prop controls how the menu position is determined:
relativeTo="trigger" - Measures the trigger element using .measure() to get its position. On Android, this .measure() call was failing/not returning, so pressPosition was never set.
relativeTo="longPress" - Uses the event coordinates directly from the long press event (ev.nativeEvent.pageX/pageY). This is synchronous and doesn't rely on .measure().
The menu should now appear at the location where you long-press (at your finger position) rather than relative to the trigger element. This is actually a more natural UX for context menus anyway.
I got the menu to work like this, not sure if thats the optimal solution:

Metadata
Metadata
Assignees
Labels
Type
Projects
Status