phetsims / phet-core

Core utilities used by all PhET simulations.
MIT License
8 stars 6 forks source link

iOS 13 Reorienting screen can put sim in corner #65

Closed KatieWoe closed 5 years ago

KatieWoe commented 5 years ago

Found when looking at https://github.com/phetsims/phet-core/issues/64. If you start a sim in portrait, move to landscape, and then move back to portrait, the sim will shift to take up only the upper left corner of the screen. You must be out of full screen to achieve this, but once you have, full screen will show the bug as well. Image from iOS (1) Image from iOS

ariel-phet commented 5 years ago

https://www.youtube.com/watch?v=NyC--vsiGEI

ariel-phet commented 5 years ago

@jonathanolson said today he will investigate while he has the iOS 13 iPad

jonathanolson commented 5 years ago

Should be fixed in master (as part of the commit for https://github.com/phetsims/phet-core/issues/64), can you verify?

KatieWoe commented 5 years ago

Looks good on master. Checked two different sims

KatieWoe commented 5 years ago

For https://github.com/phetsims/QA/issues/427. If you have the sim in portrait. Lock the iPad by pressing the upper right button, and then unlock it, the sim will be in the corner. If you reorient it fixes itself.

jonathanolson commented 5 years ago

For phetsims/QA#427. If you have the sim in portrait. Lock the iPad by pressing the upper right button, and then unlock it, the sim will be in the corner. If you reorient it fixes itself.

This does look like an issue, however iPadOS is reporting the incorrect window.innerWidth and window.innerHeight, so it's not just an event listener that would be needed. I haven't figured out a workaround yet.

jonathanolson commented 5 years ago

I haven't found a working work-around for this. We properly receive the events that the sim has resized, but we're being given buggy information (even after), so I'm somewhat at a loss of how to fix it besides submitting a bug report.

jonathanolson commented 5 years ago

I can't reproduce this on my iPhone. Can we verify if this is a problem on the live 13.1 iPadOS?

KatieWoe commented 5 years ago

It does happen on the live iPadOS. Can confirm that it is not an issue on iPhone

jonathanolson commented 5 years ago

I can look into potential workarounds (that might not be pretty or performant at all), but I can't see any other avenues besides that or "wait for Apple to fix it". @ariel-phet thoughts?

samreid commented 5 years ago

Have we given Apple a self-contained reproducible example and bug report?

jonathanolson commented 5 years ago

Not for this issue yet.

ariel-phet commented 5 years ago

Considering @KatieWoe comment https://github.com/phetsims/phet-core/issues/65#issuecomment-532289924 this now seems like a less likely use case, and reorienting fixes the condition. Closing since does not seem realistic/worth fixing.