Community.monzo.com forces rotation when loaded as standalone app


#1

Repro 5/5

  1. Lock rotation on your phone (through quick settings, system accessibility settings or wherever that is on your phone)
  2. Go to community.monzo.com in Chrome on Android
  3. Flip phone between landscape and portrait. Notice that the website does not rotate
  4. Hit “Add to home screen” (or accept if Chrome automatically prompts you because it realised you’re coming back here all the time :smiley: )
  5. Open the Monzo Community from the new icon on the home screen
  6. Flip your phone between landscape and portrait. Notice that the website now rotates

Suggested fix:

Remove the "orientation": "any" value in https://community.monzo.com/manifest.json.
Any forces the rotation, while the default value (natural I suppose) just respects the system preferences. Apparently this is to be used when doing fancy things like games, while regular web pages should stick to the default orientation. Sadly they don’t have good descriptions for the values at https://developer.mozilla.org/en-US/docs/Web/Manifest#orientation


(James Nicholson) #2

Really appreciate you digging into this, cheers!

Unfortunately, as we’re hosted by Discourse themselves, we don’t appear to have have direct access to manifest.json, and those fields from it that are exposed in settings don’t seem to include orientation :disappointed:


#3

You can send them a pull request :innocent:


#4

Fixed! Thanks for pulling in the changes!


(Rika Raybould) #5

Dug out the commit for any future reference.