Skip to content

[popover][menu][select] Improve outside press using touch modality #1214

Open
@atomiks

Description

@atomiks

Upstream issue: floating-ui/floating-ui#3138

On iOS for popups like Select and Menu, the outside press behavior is touchend + touchmove with an ~8px movement threshold. If you pressed and held the screen for >1s, then touchend also gets ignored.

This:

  1. Makes it easier to dismiss, requiring a less "intentional" press, allowing you to scroll away to dismiss the popup much more easily and feels far less restrictive and annoying
  2. Makes it a bit harder to unintentionally dismiss accidentally (the 1s threshold)

Modal dialogs and drawers on iOS match the native mousedown event, which requires an intentional/non-sloppy outside press however.

  • Popover currently uses pointerdown which doesn't match either behavior. It's less restrictive than mousedown, but also too permissive/loose compared to iOS' native behavior.
  • Menu and Select currently use mousedown, which feels too restrictive — you can't easily scroll away when it's open.
  • Dialog/AlertDialog should continue using mousedown as-is, as they take up more of the screen with an obstructive backdrop and are modal-like.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions