-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Going back using 'Shell.Current.GoToAsync("..")' causes a crash, but only when using a Mouse on an Android. #19461
Copy link
Copy link
Closed
Labels
area-controls-shellShell Navigation, Routes, Tabs, FlyoutShell Navigation, Routes, Tabs, Flyoutarea-navigationNavigationPageNavigationPagefixed-in-8.0.40fixed-in-9.0.0-preview.4.10690highIt doesn't work at all, crashes or has a big impact.It doesn't work at all, crashes or has a big impact.i/regressionThis issue described a confirmed regression on a currently supported versionThis issue described a confirmed regression on a currently supported versionmigration-compatibilityXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-ConvertXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convertplatform/androidt/bugSomething isn't workingSomething isn't working
Milestone
Metadata
Metadata
Assignees
Labels
area-controls-shellShell Navigation, Routes, Tabs, FlyoutShell Navigation, Routes, Tabs, Flyoutarea-navigationNavigationPageNavigationPagefixed-in-8.0.40fixed-in-9.0.0-preview.4.10690highIt doesn't work at all, crashes or has a big impact.It doesn't work at all, crashes or has a big impact.i/regressionThis issue described a confirmed regression on a currently supported versionThis issue described a confirmed regression on a currently supported versionmigration-compatibilityXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-ConvertXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convertplatform/androidt/bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Done
Description
...and due to a completely out of the world reason. At least that's what I am assuming.
So, I have a secondary back button in the
ContentPage, which callsGoToAsync("..")to go back. Please note that I was using Windows Subsystem for Android™️ for this testing, but I do believe this might be reproducible on any Android device with a connected mouse (though not tested).The button works perfectly when I tap it with my finger, but when I use the cursor to click the button, it crashes, and throws a
NullReferenceException. I think what actually happens is MAUI tries to send aonhovercall after the back button is clicked, but the reference is cleared, and it crashes as a result, whereas in a tap, it doesn't have to send that hover event.Here's a video demonstration:
43gg.mp4
Or I might be completely wrong about this, because it seems that abnormal.
Steps to Reproduce
Shell.Current.GoToAsync("..")NullReferenceException.Link to public reproduction project repository
https://github.com/Realinspirer/tempcheck
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 13 (others not checked)
Did you find any workaround?
A cheap workaround, kind of obvious, but may not work at times, is - disabling the back button before the page transition, so that the after events doesn't get into account.
Relevant log output