Created by: pvdlg
Fixes #21366 (closed)
This PR handle better the key inputs in input
and textarea
within dropdown
and dropdown-menu
.
As a side note, keyboard navigation is current broken and the fix is here #21535.
This PR will be fully working only when #21535 lands.
Here is the new behaviors.
input
and textarea
within a dropdown-menu
:
- Escape key: dropdown behavior => close the menu
-
Arrow down: default behavior (move to the cursor to the end of the text in the
input
ortextarea
) -
Arrow up: default behavior => move to the cursor to the beginning of the text in the
input
ortextarea
-
Space key: default behavior => enter a space character in the
input
ortextarea
-
Other key: default behavior => enter the character in the
input
ortextarea
input
and textarea
within a dropdown
but outside of the dropdown-menu
:
- Escape key: dropdown behavior => close the menu
-
Arrow down: dropdown behavior => put the focus on the first/next
dropdown-item
in the menu -
Arrow up: dropdown behavior => put the focus on the first/previous
dropdown-item
in the menu -
Space key: default behavior => enter a space character in the
input
ortextarea
-
Other key: default behavior => enter the character in the
input
ortextarea