Skip to content

Drawer (with Snap Points) closes instantly when opened inside of a PWA (iOS) #5

@elgerlambert

Description

@elgerlambert

Most examples seem to be working, but some close instantly after slightest interaction with the drawer when opened inside of a PWA. For example the "Snap Points" and "Scaled Background" examples.

Steps to reproduce:

  1. Go to https://vaul-base.vercel.app/examples (on iOS device)
  2. "Add to Home Screen" (to install as PWA)
  3. Scroll to "Snap Points" and click on "Open Drawer"

The latest published version of Vaul (1.1.2) also has some issues with Snap points when used inside of a PWA; notably the use of window.innerWidth and window.innerHeight return incorrect values on iOS when read immediately after a "resize" event (which Vaul's implementation relies on), whereas these values are correct after an "orientationchange" event (deprecated) if my memory serves me well. Found your repo through base-ui drawer "placeholder" issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions