-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add a "popup.close" event #2584
Comments
This is complete! |
Hi @mapsam . How can I listen to it? map.on('popup.close', function(e) {
alert();
}); doesn't work |
@nibygro try listen to it this way: let popup = new mapboxgl.Popup()
popup.on('close', function(e) {
alert()
}) |
@Luqqk it works, thanx! |
Thanks @Luqqk! |
It is working but pupup close event fire twice when open and close. |
I am seeing the same as @ansarikhurshid786; the popup close event fires for a new popup when it is created, if I removed an existing popup before creating the new popup |
I am also seeing popup.on('close', ...) fire on creation, and then twice on close. |
not working for me |
Same thing, this event fires in wrong time (((( |
I am also seeing popup.on('close', ...) fire on creation, and then twice on close too |
We have 2024 and 'close' event still appears on popup creation 🙄 |
updates? |
Popups should emit an event when they are closed.
The text was updated successfully, but these errors were encountered: