You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an input is the last focusable element of a Dropdown menu, tabbing from this element change the focus to the next focusable element outside the menu, but does not close the menu.
To Reproduce
Steps to reproduce the behavior:
Create a Dropdown with a toggle and a menu containing a text input, and another input after and oustide the Dropdown.
Open the menu by clicking the toggle.
Focus the text input inside the menu.
Type the 'Tab' key to focus the input outside the Dropdown.
If the 'Tab' key does not change focus and is instead used as a tabulation inside the text input, the next keyup event would have that input as a target and the menu will not be toggled.
The text was updated successfully, but these errors were encountered:
Describe the bug
When an input is the last focusable element of a Dropdown menu, tabbing from this element change the focus to the next focusable element outside the menu, but does not close the menu.
To Reproduce
Steps to reproduce the behavior:
Reproducible Example
Minimal example by using CodeSandbox.
Expected behavior
The menu should close when tabbing out from the menu.
Screenshots
Environment (please complete the following information)
Additional context
I believe it can be solved by adding a
key !== 'Tab'
condition to Dropdown.tsx:279 like so :If the 'Tab' key does not change focus and is instead used as a tabulation inside the text input, the next
keyup
event would have that input as a target and the menu will not be toggled.The text was updated successfully, but these errors were encountered: