-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<Popup> no longer captures click event context #733
Comments
I'm experiencing the exact same thing with mapbox-gl |
I know it's a crappy workaround but you could use Otherwise you could implement a check if the click on the map was a click on the popup. |
The same thing happens with onMouseUp, so that doesn't really help |
As of v4.3.0, clicks inside of Popups uncontrollably propagate up to the Map component.
react-mapbox-gl version: 4.3.0 and above
mapbox-gl-js version: 0.5.4
browser: Chrome, latest
Steps to Trigger Behavior
event.stopPropagation()
to the Popup's click handlerExpected Behavior
I expect one of two things--for the popup to capture the context of the click by default (controlled by parameter, perhaps), and/or to easily and programmatically stop the click event from bubbling up to the map.
Actual Behavior
Neither of the above seem to be the case. Clicking inside a popup fires a map click event and there's no way to prevent it.
The text was updated successfully, but these errors were encountered: