You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Afterwards, clicking on the waypoint, the closeButton would remove the waypoint, but also propagate down to the map level and end up placing a new waypoint at the location the happened to be under the closeButton.
Thanks for the detailed information and suggested fix. I'll also have a look at it and try to find out if anything breaks by not propagating the event.
Do you happen to know what versions of maplibre-gl and leaflet you upgraded to?
Interesting. I did some further investigation and it seems like this broke with leaflet 1.9.0. I'm unsure if this is actually expected behavior within leaflet since their releases do not indicate it as a breaking change. However, since it is a DomEvent, I believe propagating it is usually the right thing to do, hence LRM does something wrong here by not explicitly stopping it.
If you can, feel free to submit a PR with the proposed change. From a quick glance, it shouldn't affect any other functionality, so stopping the event from propagating is perfectly fine
I bumped some node_modules so osrm-frontend would work with vector tiles using https://github.com/maplibre/maplibre-gl-leaflet.
Afterwards, clicking on the waypoint, the closeButton would remove the waypoint, but also propagate down to the map level and end up placing a new waypoint at the location the happened to be under the closeButton.
It may be a while before I have the time to submit a PR, but changing the block at https://github.com/perliedman/leaflet-routing-machine/blob/master/src/geocoder-element.js#L82 to the block below stopped the click propagation for me.
I didn't do any work to see if it was maplibre-gl-leaflet or one of the other module upgrades that introduced this behavior.
The text was updated successfully, but these errors were encountered: