Skip to content

[bug] Bottom sheet / Filters fails to open on real mobile devices #62

Description

@AnayDhawan

What happened?

On a real phone, tapping the mobile peek bar or the "Filters" button sometimes
doesn't visibly open the bottom sheet. The underlying React state does flip
(data-state="open" on the vaul drawer), but the sheet's transform is never
applied, so it stays positioned off-screen below the viewport.

Root cause: src/components/map/map-sheet.tsx uses modal={false} with
percentage snapPoints (["48%", "92%"]) on vaul@1.1.2. Inside
vaul's internals, snapPointsOffset depends on windowDimensions being
hydrated, and the transform only gets applied once delayedSnapPoints flips
via requestAnimationFrame. Real-device timing/touch-event sequencing can
leave this incomplete.

What did you expect to happen?

Tapping the peek bar or Filters button should always open the sheet to a
visible, usable position.

Steps to reproduce

  1. Open the map page on a real phone (not devtools emulation — this didn't
    reproduce reliably there).
  2. Tap "Filters" or the peek bar at the bottom of the map.
  3. Sheet may not visibly appear, or appears stuck off-screen.

Browser and OS

Real mobile devices (Android/iOS) — did not reliably reproduce in headless
Chrome DevTools emulation.

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