Skip to content

Tap-scrolling opens ListBox (should be ignored) #3757

@nickluger

Description

@nickluger

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

2.2.4

What browser are you using?

Chrome

Reproduction URL

https://github.com/bluepick-app/headless-ui-react-listbox-tap-issue

Describe your issue

On mobile one uses tap-press to scroll, keeping the finger on the screen and moving it vertically to scroll. Whenever you do that above the ListboxButton it opens the Listbox. See video. This leads to the listbox being opened accidentally on mobile, whenever the finger happens to be over the button while scrolling.

Expected behavior:

Tapping and then lifting the finger should trigger a click-like behavior, i.e. opening the listbox. Scrolling should not.

headlessui.listbox.bug.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions