-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Bug] Popup triggers immediately onClose event + after close popup it will not open again #1825
Comments
This has to do with the use of |
Thanks.
every time I click the map or move it close event will trigger and if I try to open new popup, multiple close event will be generated. |
That sounds like mapbox/mapbox-gl-js#11535 |
I'm not using strict mode and am experiencing the same issue. Is there a work around while we wait for the fix? |
@HawaiianBBQ You are not experiencing the same issue. Please create a Code Sandbox. |
@mrajaeim After some consideration I do not think we should change how |
This should be fixed in 7.0.11. |
I'm getting this issue in 7.0.16 with strict mode off on react 18.1.0. The popup will not open when triggered, and if an onClose handler is set, then it fires immediately after the popup is triggered. Setting |
Description
Popup triggers immediately onClose event and after close popup, it will not open again
For the second problem, I think it's better to add a visibility prop for the popup to control its visibility in the parent component.
Expected Behavior
No response
Steps to Reproduce
1- first add your token to the below sandbox
2- click on the pin image
3- watch console logs (close event trigger on opening)
4- try close and reopen popup
sandbox code
Environment
Logs
No response
The text was updated successfully, but these errors were encountered: