-
Notifications
You must be signed in to change notification settings - Fork 352
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): Do not focus Dropdown if menu is not opened #1222
Conversation
Honestly I think that this bug should have been fixed differently, but this works as a hot fix. Proper fix would require adding domlisteners to DropdownMenu and triggering toggle from there because this menu is destroyed everytime we close it. Plus with this fix we would clean event listener (quite expensive to fire onToggle for multiple dropdowns). |
PatternFly-React preview: https://1222-pr-patternfly-react-patternfly.surge.sh |
Pull Request Test Coverage Report for Build 4066
💛 - Coveralls |
Thanks for submitting a bug fix for this! I wasn't able to reproduce this issue in the workspace, but also didn't see any issues with the dropdown after these changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interaction and behavior looks fine to me.
@jgiardino you can reproduce it by clicking on any dropdown, scrolling a bit so this dropdown is not visible and clicking anywhere on screen. |
Ah, ok. Thanks for the clarification. I was able to see this issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What:
If user clicks anywhere on screen and dropdown is present it will automatically scroll to such dropdown even if it's not opened.
Additional issues:
RedHatInsights/insights-frontend-components#222