dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.24k stars 1.76k forks source link

[Bug] No error when try push outside NavigationPage #2013

Closed pictos closed 8 months ago

pictos commented 3 years ago

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

Screenshots

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

Reproduction Link

Navigation_Bug.zip

Workaround

YuqinSong commented 2 years ago

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

ghost commented 2 years ago

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 commented 1 year ago

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.

XamlTest commented 1 year ago

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

PureWeen commented 1 year ago

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

XamlTest commented 1 year ago

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

kubaflo commented 9 months ago

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

jsuarezruiz commented 8 months ago

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