[PR #2389] [MERGED] RadzenDropdown: correctly close popup on item selection, ignoring OpenOnFocus #1295 #3236

Open
opened 2026-01-29 18:22:33 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/2389
Author: @joriverm
Created: 12/15/2025
Status: Merged
Merged: 12/15/2025
Merged by: @enchev

Base: masterHead: fixes/dropdownFocus


📝 Commits (1)

  • 1ed6531 RadzenDropdown: correctly close popup on item selection, ignoring OpenOnFocus

📊 Changes

1 file changed (+1 additions, -2 deletions)

View changed files

📝 Radzen.Blazor/RadzenDropDown.razor.cs (+1 -2)

📄 Description

The PR fixes #1295, and uses the ClosePopup function to handle the focus it gets, and not reopen the popup on selection.

can be tested by giving the dropdown in DropDownFiltering.razor a OpenOnFocus=true, and overwriting the OnAfterRender with the following :

protected override async Task OnAfterRenderAsync(bool firstRender)
{
    if (firstRender)
    {
        await radzenDropDown.FocusAsync();
    }
}

then selecting an item in the dropdown


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/radzenhq/radzen-blazor/pull/2389 **Author:** [@joriverm](https://github.com/joriverm) **Created:** 12/15/2025 **Status:** ✅ Merged **Merged:** 12/15/2025 **Merged by:** [@enchev](https://github.com/enchev) **Base:** `master` ← **Head:** `fixes/dropdownFocus` --- ### 📝 Commits (1) - [`1ed6531`](https://github.com/radzenhq/radzen-blazor/commit/1ed6531d0f75d3615730bda2d00d1c589df975c5) RadzenDropdown: correctly close popup on item selection, ignoring OpenOnFocus ### 📊 Changes **1 file changed** (+1 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor/RadzenDropDown.razor.cs` (+1 -2) </details> ### 📄 Description The PR fixes #1295, and uses the ClosePopup function to handle the focus it gets, and not reopen the popup on selection. can be tested by giving the dropdown in `DropDownFiltering.razor` a `OpenOnFocus=true`, and overwriting the `OnAfterRender` with the following : ``` protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) { await radzenDropDown.FocusAsync(); } } ``` then selecting an item in the dropdown --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 18:22:33 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#3236