Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onMenuClose fires on blur even though menu is closed #4623

Open
PSoltes opened this issue Jun 4, 2021 · 4 comments
Open

onMenuClose fires on blur even though menu is closed #4623

PSoltes opened this issue Jun 4, 2021 · 4 comments
Labels
menu-bug Addresses menu positioning, scrolling, or general interactions

Comments

@PSoltes
Copy link

PSoltes commented Jun 4, 2021

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.

@walt1992
Copy link

I have a same issue

@ebonow ebonow added the menu-bug Addresses menu positioning, scrolling, or general interactions label Oct 15, 2021
@rohanvachheta
Copy link

rohanvachheta commented Nov 20, 2021

@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 .

@dooyou21
Copy link

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.

@iankduffy
Copy link

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
Labels
menu-bug Addresses menu positioning, scrolling, or general interactions
Projects
None yet
Development

No branches or pull requests

6 participants