Repository navigation
fix(web): stop a marker click from also dropping a pin on the map - #689
Merged
Merged
Conversation
MapLibre mounts marker elements inside the map's event container, so a click on a marker also fires a map click at that point. The parked-car marker, the location dot, the arrival parking markers, waypoints, the selected route pill and the dropped pin left that click unclaimed: clicking the parked car opened its panel and also dropped a grey pin, and layer handlers could open whatever lay beneath a marker. bindMapMarkerActivation now owns marker clicks for every marker. It claims the click through map click ownership instead of stopping it, so map handlers leave it alone while click-away dismissal still sees it, and a click an active picker owns stays the picker's. A static test requires markers to bind through it and every map click handler to consult ownership.
Medformatik
enabled auto-merge (squash)
October 30, 2026 14:34
Medformatik
disabled auto-merge
October 30, 2026 15:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Clicking the parked-car marker opened the parking panel and also dropped the grey pin and place card of a plain map click. MapLibre mounts DOM markers inside the map's event container, so a marker click also fires a map
clickat that point. Several markers left it unclaimed:Every marker now handles clicks through
bindMapMarkerActivation. It claims the click through the existing map click ownership with a newmarkerowner. Every map click handler already ignores owned clicks.A static test requires each file that creates a marker to bind it, apart from three listed pass-through markers. It also requires every map
clickhandler to consult ownership. The integration system docs describe the rule.Verification
pnpm check-types(web) passes, and Biome passes in the pre-commit hook.road-conditionsdedupe (5.4 s against 5 s), code this PR doesn't touch. It passes on its own.main's marker code and pass with this change.next devagainst the production API with a parked car in local storage:Release and upgrade impact
Product impact: ordinary