Syncfusion Blazor ComboBox Popup Stuck After Adding New Item via NoRecordsTemplate even after calling HidePopupAsync
Hello,
I'm experiencing an issue with the Syncfusion Blazor SfComboBox component. When I add a new item using a button inside the `NoRecordsTemplate` (i.e., when the user types a custom value and clicks "Add New Scenario"), the ComboBox popup sometimes gets stuck and does not close as expected after calling `HidePopupAsync()`.
Repro Details:
- The issue is intermittent and was difficult to reproduce consistently, but it does occur.
- The ComboBox is configured with `AllowCustom`, `AllowFiltering`, and a custom `NoRecordsTemplate` that includes a button to add a new item.
- After adding the new item and calling `HidePopupAsync()`, the popup occasionally remains visible and stuck.
Steps to Reproduce:
Check out the screen recording I have attached on how to repro it in the reply message below.
1. Run the attached repro code in a Blazor Server project in Windows 10, Visual Studio 2022 in .NET 9 and Syncfusion Blazor version 31.1.19
2. Type a new scenario name that does not exist in the ComboBox. For eg: "abc" or whatever you'd like.
3. Click the "Add New Scenario" button
4. Observe that sometimes the ComboBox popup does not close as expected. At this point ComboBox becomes unusable because that popup will never hide and you need to refresh the page. Take a look at screenshot below where that "s" is stuck after adding it.
See I tried deleting it and it still stays there:
It just stays there no matter what I do. Only page refresh fixes this issue:
5. You might have to try many times to observe this. For each attempt, you have to REFRESH the page and try adding item to it. Don't keep on adding items if you don't see the issue on your first try for that page refresh. Refresh the page > Add it, Refresh the page > Add it... until you see the issue. Once it took me 30 tries to catch it.
Expected Behavior:
After adding a new item and calling `HidePopupAsync()`, the ComboBox popup should always close.
Actual Behavior:
Occasionally, the popup remains open and stuck, requiring extra clicks or page refresh to dismiss.
Repro code:
https://blazorplayground.syncfusion.com/BNhyCVisRIRNXaZl
Please help me fix this issue, and please don't give some hacky workaround. I'd like to have a proper fix for this very annoying issue.
Thank you.
Repro screen recording:
<see attached file: comboboxbugrepro_798dccd8.gif>
Repro code:
Attachment: comboboxbugrepro_798dccd8.gif
Hi Ashish Khanal,
Thank you for sharing the details with us. Based on further testing, we’ve observed that the issue appears to be related to a timing/race condition between RefreshDataAsync() and HidePopupAsync(). A simple workaround that has helped stabilize the behavior is to yield control back to the UI thread before attempting to hide the popup. This can be done by inserting await Task.Yield() before calling HidePopupAsync():
This ensures the ComboBox has finished its internal refresh cycle before the popup is closed, reducing the likelihood of the stuck state which you're facing randomly. In our tests, this approach has been more reliable than calling HidePopupAsync() immediately.
Scenarios.Add(new ReportScenario { ScenarioName = CustomScenario }); await comboBox.RefreshDataAsync(); SelectedScenario = CustomScenario; CustomScenario = null;
await Task.Yield(); // allow UI render cycle to complete await comboBox.HidePopupAsync(); |
For your reference, we have included a runnable sample along with a GIF demonstration below.
Gif:
- 2 Replies
- 2 Participants
-
AK Ashish Khanal
- Dec 11, 2025 06:32 PM UTC
- Dec 12, 2025 11:19 AM UTC