WoJ
WoJ

Reputation: 30045

Is it possible to lock an orientation in a PWA?

I wrote a PWA which should be used in portrait mode (this is a home application used by four people). I would like to lock it in portrait mode so that when the screen of the mobile is rotated, the application does not react and stays in portrait mode.

I hoped that the orientation attribute in the manifest would help but it simply sets the default orientation the application starts with.

Is there a PWA mechanism that I could use to say "no matter the orientation, keep the portrait mode"?

The workaround I will use if the above is not possible is to have a view for the rotated screen, but it will not bring anything else than aesthetics and I would prefer to have my highly-computer-deficient family only see the portrait mode.

Upvotes: 1

Views: 122

Answers (0)

Related Questions