Dropdown: clicking outside vs. closing behavior
See original GitHub issueIssue 1
- Steps: Click on the dropdown then outside.
- Expected Result: No option selected. Works if we close instead of clicking outside.
- Actual Result: First option selected.
Issue 2
- Steps: Select
Item B
then search forItem D
(no results). Close dropdown (do not click outside). - Expected Result:
Item B
displayed. - Actual Result:
Item D
displayed.Item B
is displayed back if we click outside instead.
Issue 3
- Steps: Select
Item B
then search forItem D
(no results). Click outside, open the dropdown and click outside once more. - Expected Result:
Item B
selected. - Actual Result:
Item A
selected.
Version
0.73.0
Testcases
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Avoid dropdown close on clicking outside - Stack Overflow
This dropdown will only close when the button is clicked. In some cases, you may want the Dropdown to close when the button...
Read more >How to avoid dropdown menu to close menu items on clicking ...
The default behavior of a dropdown menu is to close the menu list items when clicked ... Closes the menu in the event...
Read more >Click in dropdown closes the Drawer - Telerik UI for Blazor
When I click in the dropdown to select an item, the Drawer closes. Click and drag the scrollbar in the dropdown also closes...
Read more >Best practices for handling clicks outside element
I suggest you to add an addition event listener touchend@window->dropdown#hide to catch outside clicks on some mobile devices. 2 Likes.
Read more >Should clicking a drop-down menu in a native app a second ...
You can have other behaviors like, closing on losing focus or closing when clicked out of bounds. The clicking to close menu acts...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Does
selectOnBlur={false}
do the trick?This issue is still present the latest actual release.
0.73.0
1.2.0
https://codesandbox.io/s/cool-bose-xwn7m?file=/example.js