Semantic-ui-react: Dropdown: doesn't close when selecting another dropdown

Created on 2 Aug 2018  路  10Comments  路  Source: Semantic-Org/Semantic-UI-React

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

bug

Most helpful comment

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

All 10 comments

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

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

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

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.

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

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

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

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.

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.

Confirming #3148 has fixed this issue. 馃帀馃帀

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattmacpherson picture mattmacpherson  路  3Comments

hankthewhale picture hankthewhale  路  3Comments

laukaichung picture laukaichung  路  3Comments

nix1 picture nix1  路  3Comments

keeslinp picture keeslinp  路  3Comments