Skip to content

[iOS] TranslateToAsync causes spurious SizeChanged events after animation completion, triggering infinite layout loops #33934

@malware-dev

Description

@malware-dev

Description

Note: this is a critical and show-stopping bug for us. We cannot move to Maui10 with this issue, but we need to.

On iOS, TranslateToAsync() triggers SizeChanged events after animation completion. The view's height actually changes by a few pixels (e.g., 307.97 → 310.23).

Does not occur with ScaleYTo() - only TranslateToAsync().

During debugging, observed iOS MauiView SafeArea code continuously invalidating parent layouts. Even disabling animations doesn't fully prevent the issue. Blocking production release - no reliable workarounds found.

Expected Behavior

════ ITERATION #1 ════
╔═══ SizeChanged ═══
║ 376.47x307.97, TY:0              // Initial layout
🎬 Animation START
🔄 RESTARTING!                      // Expected restart due to initial layout
════ ITERATION #2 ════
🎬 Animation START
✅ COMPLETE!
🎉 EXIT

The animation should complete after the initial layout settles.

Actual Behavior

════ ITERATION #2 ════
🎬 Animation START: 307.97 → 0
✅ COMPLETE!
╔═══ SizeChanged ═══                // EXTRA event AFTER completion
║ 376.47x310.23, TY:0               // Height changed by ~2 pixels!
🔄 RESTARTING!
════ ITERATION #3 ════
🎬 Animation START
✅ COMPLETE!
╔═══ SizeChanged ═══                // Keeps happening!
🔄 RESTARTING!
...                                  // Infinite loop

The view height changes slightly after each TranslateToAsync() completion, causing infinite restarts and UI freezes.

Version Info

  • .NET 10 (SDK 10.0.101)
  • iOS (simulator and physical devices)

Observations

The reproduction uses a restart loop: monitors SizeChanged during animation, cancels and restarts if fired. This handles MAUI's late-resolving bindings.

Pattern worked reliably on Android and earlier MAUI versions. On iOS with .NET 10, TranslateToAsync() now triggers size changes after completion - creates infinite restart loop.

Steps to Reproduce

Reproduction project attached: DialogTestRepro.zip. This does not reproduce accurately as it does not get the full freeze our full app does, but it's the closest we've been able to get.

  1. Build and run on iOS
  2. Tap "Show Dialog"
  3. Observe infinite loop in debug output

DialogTestRepro.zip

Link to public reproduction project repository

No response

Version with bug

10.0.30

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

9.0.120 SR12

Affected platforms

iOS

Affected platform versions

I don't have the information available at this time. Newer versions though, haven't tested older ones and that's probably an idea.

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-animationAnimation, Transitions, Transformsi/regressionThis issue described a confirmed regression on a currently supported versionplatform/iosregressed-in-10-preview7s/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions