Skip to content

onMenuClose fires on blur even though menu is closed #4623

Open

Description

@PSoltes

There is a call to onMenuClose on every select blur, even when the menu is closed. It was marked as solved in #3876.

Steps to reproduce:

Thanks for all work that you put into the package.

Activity

  1. walt1992 commented on Sep 14, 2021

    @walt1992

    I have a same issue

  2. added
    menu-bugAddresses menu positioning, scrolling, or general interactions
    on Oct 15, 2021
  3. rohanvachheta commented on Nov 20, 2021

    @rohanvachheta

    @PSoltes You can make your own component wrapper for the same with using MultiValueRemove and pass same props with overriding the onClick, it will work .

  4. dooyou21 commented on Apr 14, 2022

    @dooyou21

    I have a same issue (not about MultiValueRemove, but called onMenuClose even though menu is closed)

    Steps to reproduce:

    • open codesanbox ( thanks @PSoltes )
    • click Input -> menu popup shows up
    • enter 'Esc' -> menu popup closed and onMenuClose fired
    • blur the focus by clicking outside of select -> onMenuClose fired again even if menu popup already closed

    I think onMenuClosed function should be called only one time when menu popup closed literally.

  5. iankduffy commented on Apr 10, 2024

    @iankduffy

    This seems like it is still an issue.

    I wonder if we need a check that the menu is actually still open around this code before we run onMenuClose logic.

    Screenshot 2024-04-10 at 16 34 11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    menu-bugAddresses menu positioning, scrolling, or general interactions

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions