Replies: 1 comment 1 reply
-
Hey @nkalpak, Do you know why google maps does this? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I have a google map element which I'm rendering onto a div
<div ref={mapRef} />
.I'm looking to trigger the context menu on right-click on the map:
The issue that I've observed is that google maps will call
preventDefault
on events triggered by the map div, and I've found that theContextMenu
's onContextMenu callback is wrapped incomposeEventHandlers
which won't run the Radix event handler if the event has been prevented earlier.Since the
ContextMenu
doesn't have a controlled variant, I have to rely on the internal handling of the events in order to open/close the menu, so I wanted to open a discussion to get some ideas on how this can be approached.Beta Was this translation helpful? Give feedback.
All reactions