In visionOS 26.2 RC, pushWindow + dismissWindow is broken

I recently added pushWindow to my app, and I discovered that in visionOS 26.2 RC (23N301), pushWindow followed by dismissWindow no longer works as expected.

Specifically, if the user moves the pushed window, then when the pushed window is later dismissed, the parent window's position isn't aligned with the pushed window's new position. Its original position is restored instead.

Curiously, the bug only happens when an app is launched from the visionOS home view, and not when an app is launched from Xcode. It also doesn't happen in the visionOS 26.2 simulator.

Another interesting detail is that while the parent window is hidden, if the user long-presses the Digital Crown and then dismisses the pushed window, the parent window's position seems to be immune from the Digital Crown scene reorientation. It's restored to its original real world position.

Demo video: https://youtu.be/zR3t2ON3Wz0

I've submitted feedback as FB21287011 with a sample app and detailed repro steps.

Has anyone else encountered this issue already and figured out a workaround? It would be nice if I could get pushWindow to work correctly in my app.

Thanks everybody! 😀

Answered by drewolbrich in 869636022

I believe I've discovered a workaround for this pushWindow bug. If I add the .restorationBehavior(.disabled) scene modifier to the WindowGroup corresponding to the pushed window, the bug doesn't happen.

When dismissWindow is called on a pushed window, the parent window reappears in the expected location.

Hi @drewolbrich

Thanks for filing FB21287011. I'll ensure it's routed to the appropriate team.

Accepted Answer

I believe I've discovered a workaround for this pushWindow bug. If I add the .restorationBehavior(.disabled) scene modifier to the WindowGroup corresponding to the pushed window, the bug doesn't happen.

When dismissWindow is called on a pushed window, the parent window reappears in the expected location.

In visionOS 26.2 RC, pushWindow + dismissWindow is broken
 
 
Q