Manifest orientation property

A while back the manifest.json orientation property was changed from portrait to any. This, however, makes Chrome for Android ignore the native Android orientation lock, which makes it quite difficult basically impossible to read posts with your phone sideways. In fact, the Chrome docs even say:

Use this selectively. Users prefer selecting the orientation.

This makes me think any isn’t really the default. Could the property orientation simply be omitted? The Web App of dev.to for example, works fine for me and doesn’t have it set in its manifest.

3 Likes

What do you think @falco?

At first it was portrait and people asked for any in the link OP provided.

Then we got a PR changing to natural.

Then we got complaints and changed back to any.

:man_shrugging:

We can certainly do this. Let me research a bit and get back to you.

7 Likes

I’ve noticed that while orientation is set to any, the system “orientation lock” is ignored.
Seems like the desired settings would be “same as chrome” (portrait/landscape based on how your holding the device, unless you’re using the system wide orientation lock)… but not sure what that translates to in W3C speak…

https://w3c.github.io/screen-orientation/#idl-def-OrientationLockType

2 Likes

Same here, have been discussing it in this thread:

2 Likes

Okay let’s try this:

7 Likes

Looks great! This should remedy these issues - thank you so much for looking into this! :slight_smile:

2 Likes

Hmm, do I need to re-install the PWA for this to take an effect? I was testing it here on meta and still have issues, even after restarting my phone.

It’s like an app, uninstall it (in the app list in the OS settings or dragging the icon to the corner in some launchers) and then navigate to Meta to install again.

Manifest properties auto-update in the background for stuff like site name, logo and colors, but I don’t think orientation is one of those that updates.

7 Likes

Thanks for the fix! I don’t think I can mark it as a solution, so a like and a reply will have to do.

I didn’t have to reinstall the PWA, but that may just be a coincidence.

5 Likes

That good to know, thanks for the info. Those sneaky webapk updates are looking good.

3 Likes