Closed Phenek closed 2 years ago
@Phenek does this include iOS 14.5 as well? or strictly iOS 14?
@LuckyDucko iOS 14.5.1 has the issue.
This happen when the keyboard want to show up Hope it can help
I added the repo as reference, and found out that the renderer is disposed when the MainPage changed. But it should not be disposed at this time.
Commenting the dispose function give me a workaround. (ligne 41 of PopupPageRenderer.cs)
protected override void Dispose(bool disposing)
{
//if (disposing)
//{
// View?.RemoveGestureRecognizer(_tapGestureRecognizer);
//}
//base.Dispose(disposing);
//_isDisposed = true;
}
But I did not find a real explanation, and how to fix it properly.
@Phenek sorry I have been working on the MAUI extension.
I currently test using an iOS 14.5 device with this repo and haven't run into any issues, can you provide a sample repo?
Ok let me try to explain my issue. (I got a fixe at the end :)
I have a SplashScreen : PopupPage
I put this Splashscreen as MainPage inside App constructor
MainPage = new SplashScreen(true, 0);
When App construction, api calls and stuff is finished, I change the MainPage
Task.Run(async () =>
{
_loadedMainPage = new AppShell();
//await LoadStuff
MainThread.BeginInvokeOnMainThread(() =>
{
MainPage = _loadedMainPage;
});
});
At this moment Renderers are dispose, and when I want to interact with an entry inside a new PopupPage I had this exception when the keyboard want to show up and PopupPage need to resize for keyboard.
I found a fixe, by verifying if the renderer is dispose, before updating layout when keyboard appear (line 110 in PopupPageRenderer.cs
public override void ViewDidLayoutSubviews()
{
if (_isDisposed) return;
base.ViewDidLayoutSubviews();
this.UpdateSize();
}
The layout is well resized when the keyboard appear and no exceptions!
Hope it can be enough for you, or should I create a little project to reproduce the error?
Update: This is affecting all real devices (iOS 14,15..) when App is compiled with Xamarin.iOS 15.0 No issue occur in simulator.
Hello,
🐛 Bug Report
After updating Xamarin.iOS 15.0, I got an exception "Cannot access a disposed object. Object name: 'PopupPageRenderer'." when interacting with a Rg.popup.Page, on my Iphone X (iOS 14)
I don't have this exception on simulator running IOS 15
Expected behavior
The PopupPagerenderer should not be dispose.
Reproduction steps
You can try to repoduce it when interacting with an Entry inside a RG.Popup.Page, on an Iphone with iOS 14 and App builded with Xamarin.iOS 15
Configuration
Platform:
Thanks for your good repository!