Skip to content

fix: allow map popup to reopen after being closed#1634

Open
sim6 wants to merge 1 commit into
nextcloud:masterfrom
sim6:fix_allow_map_popup_to_reopen_after_being_closed
Open

fix: allow map popup to reopen after being closed#1634
sim6 wants to merge 1 commit into
nextcloud:masterfrom
sim6:fix_allow_map_popup_to_reopen_after_being_closed

Conversation

@sim6

@sim6 sim6 commented Jul 23, 2026

Copy link
Copy Markdown

Clicking on the map only opened the popup on the very first click. Subsequent clicks were silently ignored.

The onMapNormalLeftClick handler used Leaflet's internal map._popup property to detect whether a popup was currently open. After the ClickSearchPopup marker was removed from the map, this reference could persist as stale and non-null, causing every following click to believe a popup was still active.

The leftClickSearching flag already tracks whether our popup is open, making the map._popup check redundant. Removing it restores the expected open/close toggle behavior.

Clicking on the map only opened the popup on the very first click.
Subsequent clicks were silently ignored.

The onMapNormalLeftClick handler used Leaflet's internal map._popup
property to detect whether a popup was currently open. After the
ClickSearchPopup marker was removed from the map, this reference
could persist as stale and non-null, causing every following click
to believe a popup was still active.

The leftClickSearching flag already tracks whether our popup is open,
making the map._popup check redundant. Removing it restores the
expected open/close toggle behavior.

Signed-off-by: Simó Albert i Beltran <sim6@probeta.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant