fix: option list stays open after a mouse pick in single-select FluentAutocomplete
メンテナーはふだん 1 日以内に返信
@dvoituron がすでに取り組んでいます。
2026年12月3日 から。
評価
この issue はまだ評価されていません。
説明
🐛 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
- 主要言語
- C#
- スター
- 4.9k
- フォーク
- 500
- 平均マージ
- 15時間 28分
- マージ済み PR(30日)
- 58
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/fluentui-blazor のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
microsoft/fluentui-blazor#5721 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
microsoft/fluentui-blazor#5684 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
microsoft/fluentui-blazor#5711 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
microsoft/fluentui-blazor#5707 ·
メンテナーはふだん 1 日以内に返信
-
fix: [v5] FluentValidationMessage icon shrinks when the validation message wraps対応中かも @vnbaaij が 2 日前に担当しました。 オープン
microsoft/fluentui-blazor#5703 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
microsoft/fluentui-blazor の issue をすべて見る
似ている issue
-
good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Klyroo/klyroo-dashboard#12 ·
メンテナーはふだん 1 日以内に返信
-
CONTRIBUTING rules Node out in step 0, then tells client-side contributors to run node --test, which is what CI gates on対応中かも @yadavraj2001 が今日担当しました。 オープンdocumentation good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
juandresrodca/AdminForge#73 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[辞書] VIVANTオープン要トリアージ 辞書
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
christian-raj/S-Aloha#504 ·
-
Issue: Feature Request Xenonid
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信