-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix(Dropdown): reopens after switching back to browser window #627
Comments
I'm not sure this should be considered a bug. The Dropdown closes on blur, click outside, escape key, or item select. None of these happen on tab switch, so it never closes. None of the Dropdown examples close for me when switching to a new tab, so they are all open when I switch back. Chrome 53.0.2785.143 Lastly, this is also the behavior of the Dropdown in SUI core. Closing as I don't think we should change anything here. |
Another way of looking at it is this, the user opened the menu so expecting:
I don't think makes sense, since the user never gave interaction to close it initially. Hope that helps clarify. |
The dropdown is already closed (after selecting an item) before switching to another tab/window! So when I switch back to the dropdown it should stay closed. |
Oh boy, shame on me for skipping step 2, thanks for the clarification. Best guess is that the focus event is being called again, therefore opening the Dropdown. We probably need to blur the element after select. This map also address https://github.com/TechnologyAdvice/stardust/issues/573 actually, since the focus will no longer be applied. |
Hello. I copied and pasted the code on the Menu example and got this error. This happens after I try to click on the dropdown to close it. It is also triggered on any click after the first one. Here is the render function code:
I am using the latest version of React Semantic. |
See #659 |
Steps
Expected
Dropdown
should still be closed since no user interaction happened.Result
Dropdown
opened / is visible without user interaction.Testcase
Dropdown docs
I tested this with the latest version of Chrome(Win10 & macOS) and the latest version of Safari (macOS).
The Selection, Single Option and Multiple Options examples work as expected!
The text was updated successfully, but these errors were encountered: