Skip to content

[bug] Map popups auto-close immediately after opening #63

Description

@AnayDhawan

What happened?

Tapping/clicking a marker opens its popup, but the popup closes again right
away, before it can be read.

Root cause: in src/components/map/map-view.tsx, the <Popup> rendered per
marker doesn't override Leaflet's defaults (closeOnClick: true,
autoClose: true), and the marker's click handler calls map.flyTo(...)
without stopPropagation(). The click-to-flyTo sequence can re-trigger
Leaflet's own close-on-click behaviour, closing the popup it just opened —
worse on touch devices due to click/touch event timing.

What did you expect to happen?

The popup should stay open until the user dismisses it or selects another
place.

Steps to reproduce

  1. Open the map page.
  2. Tap any marker pin.
  3. Popup flashes open then closes immediately, especially on mobile.

Browser and OS

Reproduces on mobile touch devices most consistently; can also happen on
desktop depending on click/flyTo timing.

Checklist

  • I searched existing issues and this is not a duplicate.
  • This is not a security vulnerability (those go to studentsuite0@gmail.com).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions