Skip to content

react-aria-components Popover immediately closes after opening when using the DatePicker code example #4533

Closed
@dvasyliev

Description

@dvasyliev

🐛 Bug Report

I created DatePicker following the example in the documentation. I created a story for this component using a storybook. When I open DatePicker page in storybook > open dev tools > enable mobile mode > try open date picker - it immediately closes.

🤔 Expected Behavior

The date picker popover should be opened

😯 Current Behavior

The date picker immediately closes
Storybook link: https://dvasyliev.github.io/react-aria-components-popover-issue/?path=/story/datepicker--default

💁 Possible Solution

When I wrapped Button and Popover into DialogTrigger and added console.log for onOpenChange and clicked once on a button, I got first log with value "true" = opened, and second log with value "false" - closed.

🔦 Context

Our tester reported that she sees the same behaviour on Android in the Chrome browser, so it will affect clients of our application if we release it.

💻 Code Sample

Github repo: https://github.com/dvasyliev/react-aria-components-popover-issue

🌍 Your Environment

Software Version(s)
react-aria-components 1.0.0-alpha.3
@storybook/react 7.0.12
Browser Chrome version 113.0.5672.92 (Official Build) (arm64)
Operating System macOS Ventura version 13.3.1

🧢 Your Company/Team

An administrative platform for Belgian users

🕷 Tracking Issue (optional)

Not publicly available

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions