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

Dropdown: doesn't close when selecting another dropdown #3062

Closed
evollu opened this issue Aug 2, 2018 · 10 comments
Closed

Dropdown: doesn't close when selecting another dropdown #3062

evollu opened this issue Aug 2, 2018 · 10 comments
Labels

Comments

@evollu
Copy link
Contributor

evollu commented Aug 2, 2018

Bug Report

Steps

A clear and concise description of steps to reproduce the problem.

  1. go to link https://react.semantic-ui.com/modules/dropdown/#usage-close-on-blur
  2. select 1st drop down, select 2nd dropdown, select 1st dropdown again

Expected Result

The result that you expected.
only one dropdown should open at a time

Actual Result

The actual result that happened 💣
both dropdowns are open
screen shot 2018-08-02 at 5 19 59 pm

Version

0.82.1

Testcase

@annjawn
Copy link

annjawn commented Aug 3, 2018

I can confirm that this is really an issue. I am encountering the same after using 3 dropdowns in a Header bar. It's really inconsistent. Sometime the menu closes when another one opens sometimes it doesn't.

menu

@layershifter
Copy link
Member

@annjawn please make sure that you're using the latest version.

@layershifter
Copy link
Member

The described issue comes from the closeOnBlur prop, I need to perform an additional checkes, it can be expected behaviour.

@annjawn
Copy link

annjawn commented Aug 3, 2018

I can confirm that this issue not only happens when using Subcomponent API Dropdown.Menu but also using shorthand with options. I just updated the module about an hour ago hoping for a fix but the issue persists. As a workaround I had to manage individual states using open, onOpen, and onBlur for each <Dropdown> component.

@levithomason
Copy link
Member

This could be related to #3006. Multiple popups have the same issue. Perhaps this is an event handling problem in EventStack.

@crowdozer
Copy link

If it helps at all, the process is actually very consistent, exact steps:

  1. Open a dropdown
  2. Open a new dropdown
  3. Open any dropdown but the one from step 2
  4. The dropdown from step 2 is no longer being managed, repeat from step 2 with a new dropdown to open as many as you want
  5. Click the dropdowns that are unmanaged to manually close them, they work as intended until you do this to them again
    (I'm using the terms managed and unmanaged solely to refer to them opening/closing automatically, I don't know exactly how it works behind the scenes.)

@evollu
Copy link
Contributor Author

evollu commented Aug 23, 2018

This issue has been stale for a while. Is anyone looking into it?

@levithomason
Copy link
Member

Yes, I've been investigating on weekends as available. There is a related issue with opening multiple popups. There is something possibly awry in EventStack, or even Portal. More eyes are very welcome.

@lucmerceron
Copy link

I did a small investigation and described it on this issue.
I could work on a solution if someone could tell me the right direction to take.

@layershifter layershifter changed the title dropdown doesn't close when selecting another dropdown Dropdown: doesn't close when selecting another dropdown Sep 11, 2018
@layershifter layershifter added bug and removed triage labels Sep 11, 2018
@annjawn
Copy link

annjawn commented Sep 13, 2018

Confirming #3148 has fixed this issue. 🎉🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants