Semantic-UI-React icon indicating copy to clipboard operation
Semantic-UI-React copied to clipboard

selectItemOnEnter doesn't seems to work and closes the dropdown

Open nileshgulia1 opened this issue 4 years ago • 3 comments
trafficstars

Bug Report

Steps

Have a Dropdown separated with several headings and a <Input/> in one of the sections. Pressing "Space" key when typing something closes the dropdown without selecting an item.

Expected Result

In an Input it shouldn't close the dropdown.

Actual Result

It closes the dropdown without selecting an item.

Version

0.88.1

Testcase

I have a workaround by using stopPropagation() along with closeOnChange, but then preventDefault here doesn't allow to put a text thereafter.

nileshgulia1 avatar Aug 02 '21 07:08 nileshgulia1

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

welcome[bot] avatar Aug 02 '21 07:08 welcome[bot]

Maybe we can add one more closing condition for <Inputs/> https://github.com/Semantic-Org/Semantic-UI-React/blob/master/src/modules/Dropdown/Dropdown.js#L193

nileshgulia1 avatar Aug 02 '21 07:08 nileshgulia1

@nileshgulia1 try the fix from https://github.com/Semantic-Org/Semantic-UI-React/issues/4142 - this seems to be the same issue

jonatanYanovsky avatar Aug 13 '21 19:08 jonatanYanovsky