Semantic-ui-react: Dropdown: multiple search selection dropdown won't close when clicking the search input for second time

Created on 6 Jun 2018  路  7Comments  路  Source: Semantic-Org/Semantic-UI-React

Bug Report

Steps

  1. Go to https://react.semantic-ui.com/modules/dropdown#types-multiple-search-selection
  2. Click on the "State" placeholder to open the dropdown.
  3. When opened, click again (once) on the "State" placeholder.

Expected Result

When clicking outside of the dropdown, the dropdown should close.

Actual Result

The dropdown doesn't close.
If you skip step (3) above, the dropdown closes as expected

Version

0.81.1

bug help wanted

Most helpful comment

Thanks.
I just wanted to point out another use-case (more common):
Instead of step (3) you can select an option and then remove it (by clicking its x). Same behavior.

Is there a manual workaround I can implement in JS?

All 7 comments

馃憢 Thanks for opening your first issue here! If you're reporting a 馃悶 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

I was working on a related issue the other day and ran out of time. I think we need to:

  1. Completely remove the handleClose method in the Dropdown.
  2. Move event sub/unsub calls attachHandlersOn* where * is the event or action. Example, we have attachHandlersOnOpen, but not for close, focus, blur, etc.
  3. Update sub/unsub calls to instead call the appropriate attachHandlersOn* method.

When I was testing this locally, removing handleClose and consolidating our sub/unsub calls seemed to resolve past and present open/close/focus/blur bugs.

Possibly related: #2744

Thanks.
I just wanted to point out another use-case (more common):
Instead of step (3) you can select an option and then remove it (by clicking its x). Same behavior.

Is there a manual workaround I can implement in JS?

Hi, I've the same issue.

just wanted to point out another use-case (more common):
Instead of step (3) you can select an option and then remove it (by clicking its x). Same behavior.

@GuyShaanan this was fixed in 0.82.2

Regarding what was initially described in bug report, second click on "State" misses input element and input becomes not in focus anymore.
Multiple search selection sets width: 2.2em for input element, so its easy to miss it.

@krnkl Can confirm it works in 0.82.2.
Thanks!

Confirmed, works fine in the latest.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlvMF1 picture AlvMF1  路  3Comments

Ctesias picture Ctesias  路  3Comments

GautierT picture GautierT  路  3Comments

KevinGorjan picture KevinGorjan  路  3Comments

eXtreme picture eXtreme  路  3Comments