-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS CarouselView crashes with "MauiContext should have been set on parent." #23278
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Open similar issues:
Closed similar issues:
|
I can repro this issue at iOS platform on the latest 17.10.2(8.0.61) |
@PureWeen tested on the latest nightly build 8.0.70-ci.net8.24355.1, we now get this exception when trying to scroll the carousel
|
Hmmm I'm going to revert my previous commit, I'll have to revisit this next week to see if there's a path we can implement. My current suggestions are
|
@ESO-ST based on your sample it looks like this works private static void RegisterRenderers(IMauiHandlersCollection handlersCollection)
{
#if IOS
LayoutHandler.CommandMapper.ModifyMapping(nameof(ILayoutHandler.Remove), OnThing);
#endif
}
private static void OnThing(ILayoutHandler handler, Microsoft.Maui.ILayout layout, object? arg3, Action<IElementHandler, IElement, object?>? action)
{
if (arg3 is LayoutHandlerUpdate args && args.View.Handler is null)
{
// if you're not messing with the zindexes then you can just remove the platformview via the index
#if IOS
(layout.Handler as IPlatformViewHandler).PlatformView.Subviews[args.Index].RemoveFromSuperview();
#endif
}
else
{
action?.Invoke(handler, layout, arg3);
}
} |
Description
When a CarouselView is in a Mopups popup page, if we try to scroll through it we will get a crash
Steps to Reproduce
Link to public reproduction project repository
https://github.com/ESO-ST/CarouselViewCrash
Version with bug
8.0.60 SR6
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.40 SR5
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: