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

PF4 Dropdown throws error if first DropdownItem is disabled with Tab key #2017

Closed
ryelo opened this issue May 15, 2019 · 0 comments · Fixed by #2025
Closed

PF4 Dropdown throws error if first DropdownItem is disabled with Tab key #2017

ryelo opened this issue May 15, 2019 · 0 comments · Fixed by #2025
Assignees
Labels
PF4 React issues for the PF4 core effort
Milestone

Comments

@ryelo
Copy link
Member

ryelo commented May 15, 2019

Reproduced in StackBlitz: https://react-ax9nl6.stackblitz.io/

If you have something like:

<Dropdown>
  <DropdownItem isDisabled>Foo</DropdownItem>
  <DropdownItem>Bar</DropdownItem>
</DropDown>

If you try to tab over to the dropdown and hit Enter to open it, a console error is thrown:
Cannot read property 'focus' of null

This also removed the Dropdown from the page and it will only appear on reload.

@tlabaj tlabaj added PF4 React issues for the PF4 core effort bug 🐛 labels May 15, 2019
@kmcfaul kmcfaul self-assigned this May 15, 2019
@rachael-phillips rachael-phillips added this to the 1.0.0-rc-2 milestone May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PF4 React issues for the PF4 core effort
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants