fix: option list stays open after a mouse pick in single-select FluentAutocomplete
I maintainer di solito rispondono entro 1 giorno
@dvoituron ci sta già lavorando.
Dal 3/12/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
🐛 Bug Report
In v5, a FluentAutocomplete with Multiple="false" keeps its option list open after the user clicks an option. The pick is saved and shown, but the list stays open over the page until the user clicks somewhere else or presses Escape.
A pick made with the keyboard (ArrowDown + Enter) closes the list, so mouse and keyboard behave differently. In v4, the list closed after each pick (see #2819, which asked for a keepOpen option).
💻 Repro or Code Sample
<FluentAutocomplete TOption="string" TValue="string"
Label="Specialty"
Multiple="false"
ImmediateDelay="0"
OnOptionsSearch="Search"
@bind-SelectedItem="_picked" />
@code {
private string? _picked;
private static readonly string[] Items = ["Cardiology", "Dermatology", "Neurology", "Urology"];
private void Search(OptionsSearchEventArgs<string> args) =>
args.Items = Items.Where(item => item.Contains(args.Text ?? "", StringComparison.OrdinalIgnoreCase));
}
- Click the input and press ArrowDown, or type "o", to open the list.
- Click "Cardiology" with the mouse.
🤔 Expected Behavior
The list closes after the pick, as it does after Enter, and aria-expanded becomes false.
😯 Current Behavior
- "Cardiology" shows as the picked value.
- The list stays open: the
fluent-popover-bkeepsopened="true", and the other options stay visible and clickable.
💁 Possible Solution
InternalSelectedItemsChangedHandlerAsync (src/Core/Components/List/FluentAutocomplete.razor.cs) updates the pick and calls SetInputFocusAsync(), but it never sets _isOpen = false. The Enter path closes the list in two places: OnTextInputKeyDownAsync sets _isOpen = false, and the script calls Popover.closePopover().
A possible fix is to close the list in the single-select branch of that handler:
// Multiple = False
else
{
...
_isOpen = false;
}
A multi-select list must stay open, so that the user can pick more items.
The code on dev at 9eb965ae is the same as in 5.1.0, so 5.2 still has this bug.
As a workaround, we call closePopover() on fluent-popover-b[anchor-id="<input id>"] after the pick renders. The popovertoggle event then sets Opened back to false, through OnToggleAsync and @bind-Opened.
🔦 Context
Single-select pickers (a long dropdown list, a person search, a group search) leave their list over the rest of the form after each mouse pick. Users read this as a broken dropdown.
🌍 Your Environment
- OS & Device: Windows 11 on PC
- Browser: Chromium (Playwright) and a Chromium-based desktop browser
- .NET 10 and Fluent UI Blazor 5.1.0 (Blazor WebAssembly); also checked against
devat 9eb965ae
- Lingua principale
- C#
- Stelle
- 4.9k
- Fork
- 500
- Merge medio
- 15h 28m
- PR unite (30g)
- 58
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/fluentui-blazor
-
fix: [v5] FluentTextInput throws from ElementInternals during .NET 11 enhanced form navigationAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
microsoft/fluentui-blazor#5721 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
microsoft/fluentui-blazor#5684 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 56/100
microsoft/fluentui-blazor#5711 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
microsoft/fluentui-blazor#5707 ·
I maintainer di solito rispondono entro 1 giorno
-
fix: [v5] FluentValidationMessage icon shrinks when the validation message wrapsForse già presa @vnbaaij l’ha presa 2 giorni fa. Aperta
microsoft/fluentui-blazor#5703 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/fluentui-blazor
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
[BUG] speech tts synthesize rejects valid locales such as fil-PH, yue-CN and sr-Latn-RS in --languageForse già presa @Shizoqua l’ha presa oggi. ApertaAzure.Mcp.Server needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
Project dependencies are outdatedForse già presa @yasmoradi l’ha presa oggi. Apertadependencies
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
bitfoundation/bitplatform#15616 ·
I maintainer di solito rispondono entro 1 giorno
-
:watch: Not Triaged Pri3
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
I maintainer di solito rispondono entro 1 giorno
-
area-controls-shell platform/android
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
dotnet/maui#41304 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno