Skip to content

Clicking on another overlay trigger or focusable element does not focus the element when an overlay was already open #2061

Closed
@jeroenwienk

Description

@jeroenwienk

🐛 Bug Report

In the storybook example https://reactspectrum.blob.core.windows.net/reactspectrum/9ea100232a1a4a868a6d29056ec6eed958e796b4/storybook/index.html?path=/story/usemenu--double-menu-fires-oninteractoutside I expect when I open the first menu and click on the second one the first one closes and the seconds one opens but this does not happen. Also if you try to focus the input field you have to click twice if you have one of the menus open.

🤔 Expected Behavior

I expect the next menu to open or the input to be focused immediatly on a overlay close.

😯 Current Behavior

The first menu closes and you have to click again to open the second menu or focus the input.

💁 Possible Solution

🔦 Context

💻 Code Sample

🌍 Your Environment

Software Version(s)
react-aria 3.7.1
react-stately 3.6.1
Browser Chrome 91.0.4472.124
Operating System Windows 10

🧢 Your Company/Team

🕷 Tracking Issue (optional)

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