FluentNavItem in hamburger drawer triggers duplicate navigation and breaks NavigationLock confirmation
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by reading FluentNavItem.OnClickHandlerAsync, which the issue identifies as closing the hamburger drawer and calling NavigationManager.NavigateTo(Href) while the item also renders as a link. Reproduce the two NavigationLock callbacks with deferred navigation and an open drawer, then trace how the link and drawer click handlers interact. Done means one navigation request reaches the confirmation callback, with OK navigating and Cancel keeping the current page open.
索引モデルが issue の本文から書いたものです。
説明
🐛 Bug Report
FluentNavItem inside an open FluentLayoutHamburger drawer appears to trigger navigation twice. This prevents an unsaved-changes confirmation using Blazor's NavigationLock from reliably allowing navigation when the user selects primary.
💻 Repro or Code Sample
- Configure a
FluentLayoutwithNavigationDeferredLoading="true". - Add a
FluentLayoutHamburgerand aFluentNavcontaining aFluentNavItemwith a relativeHrefto the layout's navigation area. - On a page with unsaved changes, use a
NavigationLockto ask the user to confirm before navigating. - Open the hamburger drawer and click a navigation item.
- In the
OnBeforeInternalNavigationcallback, observe two calls for the same destination:TargetLocation:http://localhost:10000/target,IsNavigationIntercepted:trueTargetLocation:target,IsNavigationIntercepted:false
Relevant layout pattern:
<FluentLayout NavigationDeferredLoading="true">
<FluentLayoutItem Area="LayoutArea.Header">
<FluentLayoutHamburger Display="HamburgerDisplay.DesktopMobile" />
</FluentLayoutItem>
<FluentLayoutItem Area="LayoutArea.Navigation">
<FluentNav>
<FluentNavItem Href="target">
Target
</FluentNavItem>
</FluentNav>
</FluentLayoutItem>
</FluentLayout>
The page registers a NavigationLock while it has unsaved changes.
🤔 Expected Behavior
Clicking a navigation item in the drawer should trigger one navigation request and one confirmation dialog. OK should navigate to the selected page; Cancel should keep the current page open.
😯 Current Behavior
The location-changing callback is invoked twice for the same destination: once for an intercepted link navigation and once for a programmatic navigation using the relative Href.
If the application prevents a second confirmation dialog while the first is open, the second navigation request can be canceled or supersede the first. As a result, selecting OK does not reliably navigate.
💁 Possible Solution
Ensure that drawer navigation uses only one navigation path. FluentNavItem.OnClickHandlerAsync closes an open hamburger and then calls NavigationManager.NavigateTo(Href), while the item is also rendered as a link.
Could the normal link navigation and the drawer-specific programmatic navigation be made mutually exclusive?
🔦 Context
This affects navigation away from pages with unsaved changes. The application uses NavigationLock to let users either discard their changes and proceed or cancel navigation.
🌍 Your Environment
- OS & Device: Windows PC 10.0.26100 build 26100
- Browser: Microsoft Edge 158.0.4370.45
- .NET and Fluent UI Blazor library Version: .NET 10, Microsoft.FluentUI.AspNetCore.Components 5.0.0
- Blazor render mode: Interactive Server
- 主要言語
- 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 日以内に返信
-
fix: option list stays open after a mouse pick in single-select FluentAutocomplete対応中かも @dvoituron が 1 日前に担当しました。 オープン
microsoft/fluentui-blazor#5715 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
microsoft/fluentui-blazor#5711 ·
メンテナーはふだん 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
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[BUG] speech tts synthesize rejects valid locales such as fil-PH, yue-CN and sr-Latn-RS in --language対応中かも @Shizoqua が今日担当しました。 オープンAzure.Mcp.Server needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
Project dependencies are outdated対応中かも @yasmoradi が今日担当しました。 オープンdependencies
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
bitfoundation/bitplatform#15616 ·
メンテナーはふだん 1 日以内に返信
-
:watch: Not Triaged Pri3
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
メンテナーはふだん 1 日以内に返信
-
area-controls-shell platform/android
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
dotnet/maui#41304 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信