From 64343f5182aaf94fd71c75db08249a8fcc4fb4a7 Mon Sep 17 00:00:00 2001 From: BagavathiPerumal <93652794+BagavathiPerumal@users.noreply.github.com> Date: Wed, 11 Sep 2024 01:00:10 +0530 Subject: [PATCH] Fix for the Nested Entry View In A Frame Causes Crash (#24543) * Committed the changes of the issue * properly fixed the Object disposed exception * Added the proper name of test case * Removing the unneccesary space * fix-15196-Removed the Dispose method. * fix-15196-Modified and removed the changes in test case and sample. --------- Co-authored-by: AhamedAliNishad --- .../Handlers/Android/FrameRenderer.cs | 1 - .../TestCases.HostApp/Issues/Issue15196.xaml | 13 ++++++++ .../Issues/Issue15196.xaml.cs | 30 +++++++++++++++++++ .../Tests/Issues/Issue15196.cs | 23 ++++++++++++++ 4 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue15196.xaml create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue15196.xaml.cs create mode 100644 src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue15196.cs diff --git a/src/Controls/src/Core/Compatibility/Handlers/Android/FrameRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/Android/FrameRenderer.cs index bb64e53baf..c5cdb32231 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Android/FrameRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Android/FrameRenderer.cs @@ -131,7 +131,6 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility { var child = GetChildAt(0); child?.RemoveFromParent(); - child?.Dispose(); } Element?.Handler?.DisconnectHandler(); diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue15196.xaml b/src/Controls/tests/TestCases.HostApp/Issues/Issue15196.xaml new file mode 100644 index 0000000000..915d6836d2 --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue15196.xaml @@ -0,0 +1,13 @@ + + + + + + + +