RadzenDropDown selection by spacebar #1648

Closed
opened 2026-01-29 17:56:41 +00:00 by claunia · 2 comments
Owner

Originally created by @vitaliyLy on GitHub (Mar 1, 2025).

RadzenDropDown, the ability to select an option with a spacebar.

To Reproduce:

  1. Set Multiple and AllowFiltering to true.
  2. Try to search some.
  3. When a result appears move down by keyboard (arrow-down).

Image

  1. Try to choose an option by spacebar.
  2. Space will be added to the search keyword and the result will be empty.

Image

Expected:
Select an option by spacebar and if you type a character or digit (etc) it corrects the search word.

Here is an example of the new behavior I am trying to describe:

Originally created by @vitaliyLy on GitHub (Mar 1, 2025). RadzenDropDown, the ability to select an option with a spacebar. **To Reproduce:** 1. Set Multiple and AllowFiltering to true. 2. Try to search some. 3. When a result appears move down by keyboard (arrow-down). ![Image](https://github.com/user-attachments/assets/9e31faae-3c68-4d2f-9a8a-8b19bd9893ee) 4. Try to choose an option by spacebar. 5. Space will be added to the search keyword and the result will be empty. ![Image](https://github.com/user-attachments/assets/651c52ee-0086-4805-8404-0ee9dfd852fb) **Expected:** Select an option by spacebar and if you type a character or digit (etc) it corrects the search word. Here is an [example](https://blazor.syncfusion.com/demos/multiselect-dropdown/checkbox) of the new behavior I am trying to describe:
Author
Owner

@Anspitzen commented on GitHub (Mar 3, 2025):

Select with the ENTER key instead of SPACE does work though.
That's also how it is documented on the Keyboard Navigation for DropDown

But I do agree that it is somewhat unusal. Most other apps do use the SPACE for select when there is a Checkbox, even the RadzenCheckBox does use the SPACE there. But then the DatePicker and the single DropDown do make sense with the ENTER for selecting from the popup, so it doesn't make that much sense to change it based on single/multiple mode.
Additional to consider: The ENTER also gets caught by the DropDown (either to open it or select any item) and will not trigger the RadzenTemplateForm it is maybe embedded in.

@Anspitzen commented on GitHub (Mar 3, 2025): Select with the ENTER key instead of SPACE does work though. That's also how it is documented on the [Keyboard Navigation for DropDown](https://blazor.radzen.com/dropdown?theme=standard#keyboard-navigation) But I do agree that it is somewhat unusal. Most other apps do use the SPACE for select when there is a Checkbox, even the RadzenCheckBox does use the SPACE there. But then the DatePicker and the single DropDown do make sense with the ENTER for selecting from the popup, so it doesn't make that much sense to change it based on single/multiple mode. Additional to consider: The ENTER also gets caught by the DropDown (either to open it or select any item) and will not trigger the RadzenTemplateForm it is maybe embedded in.
Author
Owner

@srielango commented on GitHub (Mar 23, 2025):

@Anspitzen

I understand your point about using Enter as the default for selection, but many apps and even RadzenCheckBox use Space for selection in multi-select scenarios.

To maintain backward compatibility and avoid breaking forms that rely on Enter, I have implemented a fix that:

  • Supports Space for selecting items in multi-select mode.
  • Prevents page scrolling when Space is used.
  • Does not interfere with Enter behavior in forms.

Would you be open to a PR with this fix? I’ve already tested it and ensured that existing behavior remains intact.

@srielango commented on GitHub (Mar 23, 2025): @Anspitzen I understand your point about using Enter as the default for selection, but many apps and even RadzenCheckBox use Space for selection in multi-select scenarios. To maintain backward compatibility and avoid breaking forms that rely on Enter, I have implemented a fix that: - Supports Space for selecting items in multi-select mode. - Prevents page scrolling when Space is used. - Does not interfere with Enter behavior in forms. Would you be open to a PR with this fix? I’ve already tested it and ensured that existing behavior remains intact.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1648