maui icon indicating copy to clipboard operation
maui copied to clipboard

[Bug] No error when try push outside NavigationPage

Open pictos opened this issue 3 years ago • 7 comments

Description

Steps to Reproduce

  1. Create a simple app, and make sure that App.MainPage is any ContentPage
  2. Create a button and implement a clicked event that does Navigation.PushAsync()
  3. Nothing happens

Expected Behavior

  1. See an exception or log that tells me that I need to have a NavigationPage as the root page.
  2. When App.MainPage has a NavigationPage as the root page I want the breakpoint, inside click event handler, triggers (as you can see in the video that doesn't happen).

Actual Behavior

Nothing happens

Basic Information

  • Version with issue: preview 6 (?)
  • Last known good version: Na
  • IDE: VS 2022
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP:
  • Android Support Library Version:
  • Nuget Packages: Na
  • Affected Devices: Android

Screenshots

https://user-images.githubusercontent.com/20712372/128791827-cc4f64e3-af88-4dfc-8544-ec79a1f63083.mp4

Reproduction Link

Navigation_Bug.zip

Workaround

pictos avatar Aug 10 '21 00:08 pictos

Verified Repro with Android 11. Repro project is available: #2013.zip

YuqinSong avatar Feb 24 '22 02:02 YuqinSong

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

ghost avatar Aug 30 '22 15:08 ghost

Hi @pictos. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost avatar Apr 07 '23 02:04 ghost

Verified this issue with Visual Studio Enterprise 17.6.0 Preview 2.0. This issue repro on Android 13 with below Project:

2013.zip

NoException

XamlTest avatar Apr 07 '23 02:04 XamlTest

This is still an issue. The bug is that we should throw an exception if you aren't wrapped with a navigationpage.

PureWeen avatar Apr 14 '23 17:04 PureWeen

Thanks @PureWeen , I have updated the verify result in above comment.

XamlTest avatar Apr 19 '23 02:04 XamlTest

@PureWeen what about such solution? https://github.com/dotnet/maui/pull/20155

kubaflo avatar Jan 25 '24 13:01 kubaflo

Related PR https://github.com/dotnet/maui/pull/20155

jsuarezruiz avatar Mar 18 '24 07:03 jsuarezruiz