Skip to content

v.14.4 PopoverMenu with default props won't open on focus #2

@bdares

Description

@bdares

Related to #1

Can repro directly on demo site here - close the menu and attempt to re-open it.

When I render:

<PopoverMenu label={ <span>Foo</span> }>
  <MenuItem><Link onClick={console.log}>MENU</Link></MenuItem>
</PopoverMenu>

I end up with a menu button as expected. Focusing the button via keyboard controls does not display the menu.

Apparent cause is that OverlayTrigger listens for onBlur and closes the menu when the menu button is blurred. However, opening the menu will trigger Menu's focusIfNeeded, causing focus to be placed on the menu item, which blurs the menu trigger, causing the menu to close.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions