Skip to content
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

Fix regression about popup close button modifying the URL #8160

Merged
merged 1 commit into from
Apr 19, 2022

Conversation

IvanSanchez
Copy link
Member

Fixes #8159

@IvanSanchez IvanSanchez added this to the 1.8.1 milestone Apr 19, 2022
Copy link
Member

@Falke-Design Falke-Design left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if we should use DomEvent.stop(e) instead to prevent propagation.

Should we make a named function instead of a anonymus function? The developers would have access to the function for plugins / overwrites.

@IvanSanchez
Copy link
Member Author

I don't know if we should use DomEvent.stop(e) to prevent propagation.

I'm not 100% sure. On one hand, and after giving this a bit of thought, I'm partial to go back to how things were before #7439, and use DomEvent.stop(ev). I cannot see how propagating the click event from the close button to the popup container can be useful.

On the other hand, I don't know if @johnd0e has a good use case about clicks on the popup close button being propagated. And, there's a disableClickPropagation() call being made on the popup container anyway, so there's no risk of propagating the event to the map container.

@mourner
Copy link
Member

mourner commented Apr 19, 2022

Let's do away with just preventDefault for the fix, and look into propagation separately, since it's not causing any apparent issues at the moment.

@Malvoz Malvoz added bug accessibility Anything related to ensuring no barriers exist that prevent interactions or information access labels Apr 19, 2022
@IvanSanchez
Copy link
Member Author

I think this is good "as is", then. No plugin author complained about the lack of a _onCloseButton method, and the preventDefault() should suffice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Anything related to ensuring no barriers exist that prevent interactions or information access bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Popup close button adding #close hash to URL
4 participants