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: add closeOnEscape prop #3622

Closed
gencer opened this issue May 24, 2019 · 3 comments · Fixed by #3632
Closed

Dropdown: add closeOnEscape prop #3622

gencer opened this issue May 24, 2019 · 3 comments · Fixed by #3632

Comments

@gencer
Copy link

gencer commented May 24, 2019

Bug Report

Steps

  1. Add closeOnBlur={false} to dropdown
  2. press ESC.

Expected Result

Clicking outside and pressing ESC should not close the dropdown. I want my dropdown stay open. The reason is, I put some elements in dropdown and it has its own keybindings. ESC is one of them and when I press ESC on that element, dropdown closes completely.

Actual Result

Click works. ESC closes dropdown no matter of what.

Version

0.87.1

Testcase

See "Close on blur stays open" example in SemanticUI-React website.

Related

See here: #1995

@welcome
Copy link

welcome bot commented May 24, 2019

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

@gencer gencer changed the title closeOnBlur={false} and ESC key not working closeOnBlur={false} and ESC key not working as expected May 24, 2019
@layershifter
Copy link
Member

We have closeOnEscape in Portal, Popup & Modal, we should have it also there 🤔

@layershifter layershifter changed the title closeOnBlur={false} and ESC key not working as expected Dropdown: add closeOnEscape prop May 28, 2019
@gencer
Copy link
Author

gencer commented May 28, 2019

Ah, yes, we should have that for Dropdown too.

BTW, Is there any workaround for this until this prop added to Dropdown? Any suggestions?

/cc @layershifter

layershifter pushed a commit that referenced this issue Jun 9, 2019
* feat(Dropdown): add 'closeOnEscape' prop (#3622)

Signed-off-by: mhatvan <[email protected]>

* Update Dropdown-test.js
mbakiev pushed a commit to mbakiev/Semantic-UI-React that referenced this issue Jun 17, 2019
* feat(Dropdown): add 'closeOnEscape' prop (Semantic-Org#3622)

Signed-off-by: mhatvan <[email protected]>

* Update Dropdown-test.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants