dotnet / dotnet/maui

EventArgs.Cancel does not prevent navigation when canceling on OnNavigating event.

Open
#28,539 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-navigation partner/syncfusion platform/windows s/triaged s/verified t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 14h
Merged PRs (30d)
296

Description

Description

When canceling the navigation OnNavigating Event does not work for the below navigations

  • TabBar - Tab - ShellContent
  • TabBar - ShellContent
  • FlyoutItem - TabBar- ShellContent
  • FlyoutItem - ShellContent
Steps to Reproduce
  1. Create a sample with ShellPage with TabBar - Tab- ShellContent
  2. Override a navigating event and cancel a navigation based on the OriginalString
    Excepted output: Navigation should be canceled
    Actual output: The navigated event is triggered and navigation is completed
    CancelIssue.zip
Link to public reproduction project repository

No response

Version with bug

9.0.50 SR5

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the attached CancelIssue.zip reproduction on Windows and trace Shell navigation through OnNavigating for the listed TabBar, ShellContent, and FlyoutItem hierarchies. Done means canceling based on OriginalString prevents the navigated event and leaves navigation incomplete in each affected case.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.